Refactor the high-dpi scaling code.

Rename qemulatedhidpi -> qhighdpiscaling. Use inline
functions instead of exported functions.