A lot of this code used incorrect coordinate spaces or calculations that only
worked because things were setup in a certain way. Now that the input data is
more consistently correct and things have changed slightly, this code no
longer worked.
This patch reworks things to use what I think are the correct coordinate
spaces and calculations, and should hopefully be less prone to breakage.
Make sure the frame resolution of tiled buffers isn't discarded when they're
sent from client-side to host-side. This fixes drawing of low precision tiles
when the zoom has changed since they were last drawn.