Move some javascript enhancements to C++.

PhantomJS exposes some C++ objects to JavaScript as its API. In
addition to that these objects are enhanced by javascript code to
provide some useful additions. This commit moves those enhancements
to the C++ objects directly, making the javascript additions obsolete.
Add 'offscreen' plugin to QTPLUGIN.

The platform plugin 'offscreen' seems to provide exactly what the
previous patched version of the minimal plugin provided, that
phantomjs used to use.