Is it better to shim behind hinge leaves against the door or the frame?
This is entirely a matter of aesthetics. In one case the hinge pin (the center of pivot) moves, and in the other it doesn't, but the move is small enough that it's unlikely to cause binding. Just keep that point in mind. 

Otherwise, do what will result in the shim being least conspicuous. This isn't the ideal way to rectify door alignment, but it is often the quickest and easiest. If you have the option and the will, pull casing from the hinge jamb and do your shimming there, where it's hidden.