Does the height of the steerer tube clamp differ between stems, or is there one standard height used on all modern mountain bike stems? In my particular case I want to replace the stem on a mountain bike with a shorter one, but can I pick any other threadless stem and have it fight right on without needing any more/less spacers etc.?
No, the clamp that mounts to the steerer is not a standard height. There will be slight differences in the stack height of the clamp itself between different makes and models of stems that can typically be accommodated for with addition or subtraction of a small number of spacers, or the difference may be so slight that you don't have to change your spacers at all. Spacers are cheap so don't sweat it. The only situation where you could run into trouble is if you have no spacers and a steerer that is already nearly too short and you move to a stem with a taller steerer clamp (stack height). Doesn't sound like that's an issue in your case, though.
@kibbee Steerer length is not that important as you very very seldom get any other size than the standard 1 1/8" other sizes like the 1" steerer thread less are normally only for retro conversions and will be almost impossible to find a stem in a LBS without a special request , you are however correct on the bar size, the old standard been 1" and the new standard of 31,8mm or oversized