How do charges lose electrical potential energy when going through a resistor? I can understand that the charges need to do work against the resistance - which transfers energy to forms such as light, heat, etcetera - using the electrostatic force provided by the battery terminals. But how does this result in a loss of electrical potential energy? The charges would only lose electrical potential energy if they were closer to the end terminal - in this picture, the voltage drop is like a boulder going down a smooth hill, but in the correct picture, the boulder instantaneously falls off a cliff as soon as it reaches the resistor.
Help!
 A: What you label as the "correct picture" - namely, the charge instantaneously losing potential as soon as it enters the resistor - is incorrect. Every resistive element in a circuit has a resistivity $\rho$, which is an intrinsic property of the material. The resistance of a resistive element with length $L$ and (assumed uniform) cross-sectional area $A$ is
$$R=\frac{\rho L}{A}$$
In other words, $\frac{\rho}{A}$ is the resistance per unit length of the resistor.
What this means is that our single resistor with resistance $R$ is equivalent to $N$ smaller resistors of length $\frac{L}{N}$ and resistance $\frac{\rho \frac{L}{N}}{A}=\frac{R}{N}$. If we were to analyze this circuit of $N$ smaller resistors, we would find that there would be a voltage drop $V=I\frac{R}{N}$ across each of them, for a given current $I$. This shows that the electrical potential energy of a charge depends on its position within the resistor. In fact, we can say even more than that: a charge that at position $x$ within the resistor (where $x=0$ is the entry point) has encountered a resistor of length $x$, and so the potential drop that that charge has experienced is, by Ohm's Law,
$$V(x)=I\frac{\rho x}{A}$$
In other words, this shows that the potential difference increases linearly with position within the resistor (equivalently, the potential energy a charge has decreases linearly with distance). This energy loss is usually described as coming from collisions with the electrons and atoms within the resistor. Given that the collision rate with electrons and atoms in a resistor should be constant with time and position (as the intrinsic properties of the resistor don't change with position inside it), the answer we're getting makes physical sense.
In circuit analysis, typically we don't care about what's going on inside a resistor; rather, we're more interested in how the resistor as a whole behaves relative to other circuit elements. As such, we tend to use the lumped-element model in circuit analysis, where the effects of the resistor happen all in one "lump" that we place in a network of zero-resistance "wires." Since we don't tend to connect other circuit components to a point in the middle of a resistor (and if we do, we usually use a special variable-resistor lumped element), this model works quite well, as it only obscures the details that we don't care about in that situation. However, if you do care about what happens in the middle of a resistor (as you do in your question), then you can't use the lumped-element model to predict the physics, because it wasn't built to do that.
A: 
in this picture, the voltage drop is like a boulder going down a smooth hill, but in the correct picture, the boulder instantaneously falls off a cliff as soon as it reaches the resistor

Actually the boulder is rolling down a hill which has saplings growing on it.
The boulder accelerates (gains kinetic energy whilst losing gravitational potential energy) between hitting saplings.
When the boulder hits a sapling it loses some of its kinetic energy.
Thus the boulder rolls down the hill speeding up and then slowing down which when look on "from afar" it appears that the boulder is rolling down the hill at an approximately constant overall speed. 
In statistics a Galton board is used as a demonstration to show the build up of a normal distribution but I want you to look at the passage of the balls down the board which replicate the boulder hitting saplings.  
Now replace the word "gravitational" with "electric", "saplings" with "lattice ions" and "boulder" with "free electron" and you have a visualisation of the passage of an electron through a resistor.
A: Electromotive force is like a push required by electrons to get past the resistor. The loss of energy occurs because work has to be done against the resistance. If there was no resistor in the circuit, no EMF would be required. You can compare resistance to friction and EMF to the force applied in a object. In absence of any friction, the object will keep on moving indefinitely.
A: The charges lose potential energy by moving from a higher potential energy to a lower one. In the mean time they are accelerated and scattered. The result is an equilibrium drift speed, while the excess kinetic energy is transformed into heat.
