fdo#74702 Moved ImplInitGraphics into correct classes

Currently we check to see what type of class is being used. This
really violates the Single Responsibility Principle, and tightly
couples the code to OutputDevice. The responsibility for initializing
graphics should be done by Printer, VirtualDevice and Window.

Please note: to get this working, I've had to make Printer a friend
class of VirtualDevice. I'm not entirely happy about this, I'll
need to revisit this later when I look at Printer in more detail.
For now, this is a hack to allow me to seperate out this function.

Change-Id: I9d5946c22fa70670a4f85bf338b4209499d0aa54
Reviewed-on: https://gerrit.libreoffice.org/8528
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>