You want to prove that $U(\alpha) = \int_z u(\alpha\cdot z) dF(z)$ is continuous, given that $u(w)$ is continuous?
$|U(\alpha)-U(\alpha')| = |\int_z u(\alpha\cdot z) - u(\alpha' \cdot z) dF(z) | <\int_z |u(\alpha\cdot z) - u(\alpha' \cdot z)| dF(z)$. Take the supremum over $z$, to get
$$ \int_z |u(\alpha\cdot z) - u(\alpha' \cdot z)| dF(z) &...
If $p_1, p_2 >0$, you should consume no $x_2$, because it enters your objective negatively. So you should consume $x_1^* = (p_1 e_1 + p_2 e_2)/p_1$ and $x_2^* = 0$.
If the prices are not necessarily positive, you might be able to get infinite utility. For example, if $p_2 = -2$ and $p_1 = 1$, adding 1 unit of $x_2$ relaxes your budget constraint by 2, so ...
From your formula for $x$ when $y=0$, you should be able to find $U$ in terms of $M$ and $p_x$ when $y=0$. Similarly, $U$ in terms of $M$ and $p_y$ when $x=0$. The key then is to find the critical price ratio at which, to maximise $U$, the switch needs to occur from $y=0$ to $x=0$.
Can you take it from there?
If you take the general class of CES utility functions, of which Cobb-Douglas is a special case, you do indeed get a demand function that depends on other prices. Specifically, the CES utility function (over $n$ goods, $x_1,\dots,x_n$) takes the form
At first the individual consumes 9 units of $x_1$ and 5 units of $x_2$. But then the consumption of $x_1$ drops to 4, and you get enough $x_2$ to keep the previous profit unchanged. Determine the units of $x_2$ that the individual consumes.
Profit is an odd word here, in more mathematical terms what you are being asked to do is to evaluate
The above answer by Regio covers most of the answer
Just to emphasize further :
Consider a 2 goods case. We define MRS as the opportunity cost of consuming one more unit of good 1. Opportunity cost means "What Am I Giving Up ?". Since you are consuming only two goods, you are giving up some amount of good 2 in order to consume this one more unit of good 1. ...
It is implicit in the interpretation:
Mas-Collel: the amount that must be given (+) to compensate for a reduction (-).
Reny: The rate at which good j can be exchanged (+ & -) for good i.
The derivation from total differentiation only requires the utility to be constant, so the derivative must be negative to express that if the quantity of good $i$...