About negative energies: they set no problem:
On this context, only energy differences have significance. Negative energy appears because when you've made the integration, you've set one point where you set your energy to 0. In this case, you have chosen that $PE_1 = 0$ for $r = \infty$. If you've set $PE_1 = 1000$ at $r = \infty$, the energy was positive for some r.
However, the minus sign is important, as it is telling you that the test particle is losing potential energy when moving to $r = 0$, this is true because it is accelerating, causing an increase in $KE$:
let's calculate the $\Delta PE_1$ for a particle moving in direction of $r = 0$: $r_i = 10$ and $r_f = 1$:
$\Delta PE_1 = PE_f - PE_i = Gm(-1 - (-0.1)) = -Gm\times0.9 < 0$
as expected: we lose $PE$ and win $KE$.
Second bullet: yes, you are right. However, it is only true IF they are point particles: has they normally have a definite radius, they collide when $r = r_1 + r_2$, causing an elastic or inelastic collision.
Third bullet: you are right with $PE_2 = mgh$, however, again, you are choosing a given referential: you are assuming $PE_2 = 0$ for $y = 0$, which, on the previous notation, means that you were setting $PE_1 = 0$ for $ r = r_{earth}$.
The most important difference now is that you are saying that an increase in h is moving farther in r (if you are higher, you are farther from the Earth center).
By making the analogy to the previous problem, imagine you want to obtain the $\Delta PE_2$. In this case, you begin at $h_i = 10$ and you want move to $h_f = 1$ (moving in direction to Earth center, like $\Delta PE_1$:
$\Delta PE_2 = PE_{f} - PE_{i} = 1mg - 10mg = -9mg < 0$.
As expected, because we are falling, we are losing $PE$ and winning $KE$, the same result has $PE_1$
Fourth bullet: they both represent the same thing. The difference is that $gh$ is the first term in the Taylor series of the expansion of $PE_1$ near $r = r_{Earth}$. As exercise, try to expand $PE_1(r)$ in a taylor series, and show that the linear term is:
$PE_1 = a + \frac{Gm(r-r_{earth})}{r_{earth}^2}$.
Them numerically calculate $Gm/r_{earth}^2$ (remember that $m=m_{earth}$). If you haven't made this already, I guess you will be surprised.
So, from what I understood, your logic is totally correct, apart from two key points:
energy is defined apart of a constant value.
in the $PE_1$, increase r means decrease $1/r$, which means increase $PE_2 = -Gm/r$. In $PE_2$, increase h means increase $PE_2=mgh$.
The first law of thermodynamics says "the increase in internal energy of a body is equal to the heat supplied to the body minus work done by the body". Assuming there is no heat flow (for simplicity), this says "the increase in internal energy of a body is equal to the work done on the body". Since you are doing work on the gas, the internal energy increases.
So where does the internal energy come from? The work you're doing on it!
Think of pushing the piston. You're clearly using some force to do it, and you're exerting this force over a distance. Force times distance is work, which is a form of energy. You can picture all the little molecules bouncing off the surface of the piston as you move it. Since the piston is moving, they have a little more energy after they bounce off of it -- kind of like hitting a tennis ball with a racket. That's how they get the energy.
BTW, temperature is proportional to energy, not energy density.
Best Answer
In simple terms the internal energy can be thought of as the sum of the kinetic energy and the potential energy of the molecules.
The kinetic energy of the molecules depends on the temperature - a higher temperature means that the molecules have more kinetic energy.
The potential energy of the molecules depends on the bonds (interactions) between them - breaking bonds requires work to be done and that means that there is a increase in the potential energy.
So converting water at $100\;^\circ$C into steam at $100\;^\circ$C makes no change to the kinetic energy of the molecules but increases the potential energy of the molecules (bonds are broken) and so the internal energy of steam is greater than that of water.