Cleanup code and add native interface.

See also the following commit in PhantomJS:

commit 7317724723639932f79c211ac40f5ca06f4d9e1a
Author: Ariya Hidayat <ariya.hidayat@gmail.com>
Date:   Tue Aug 26 23:25:01 2014 -0700

Fix consistent crash on OS X when rendering to PDF format.

By implementing a dummy platform native interface (for now, it may be
extended in the near future), QPlatformPrinterSupportPlugin will avoid
the path of loading the printer support plugin
(QCocoaPrinterSupportPlugin on OS X).

Related upstream bug (QCocoaPrinterSupportPlugin problem with static
build): https://bugreports.qt-project.org/browse/QTBUG-33109

https://github.com/ariya/phantomjs/issues/12500

Change-Id: I33891d9912f2d74cf02c530718017009eb5fb390