Make emulated dpi scaling work again.

Remove OS_MAC ifdefs and encode fractional
device pixel ratios as negative ints.