Add ability to render fixed height screen capture

Due to the way PhantomJS `render()` renders pages (see https://github.com/ariya/phantomjs/issues/10619) if we want a specific height rendered screen capture of the entire page we need to workaround that issue. 

This change renders the page within an `<object>` tag when called with a height option, I also re-factored the JavaScript to clean it up and clarify a few things.