Viewport scaling and display density independence

<b>Viewport Scaling</b>
The view is scaled to be as large as possible, without changing the aspect, within the bounds of the window.

<b>Display Density Independence</b>
On "retina" displays, or other displays where window units != pixels, the view should no longer draw incorrectly.

<b>Notes:</b>
* I couldn't test with Qt (on a Mac and not getting the right GL context). I suspect it might not be fixed on high density displays. See in-line comment.
* I originally made these changes on top of #83, so it should be good to go before or after that PR.
What do you mean with that? Does devicePixelRatio always return 1 on Qt 5.0? If so, we could still enable the code on that version...

Also: Is there any particular reason why we would not want to use QScreen's devicePixelRatio? In my refactor of this branch, I'm using that instead of QPaintDevice, so it would be good to know if there are any issues with it.