Avoid redundancy in BeginFrame.

- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change.
- Pass around scroll as an int2 to reduce the number of back-and-forth casts.
This will only happen once in practice (we don't support run-time resolution changes, and I don't see that changing in the foreseeable future), but this is probably still cleaner than separating out the resolution to assign once during initialization.