Add set_viewport_size() method so its code can more easily be reused

This is useful, for example, when testing responsive designs by dynamically resizing the viewport.
Also removed the "measuring viewport" message as it can be quite distracting and does not provide much value.