fdo#74702 Move gradient steps logic into OutputDevice or Printer classes

Currently we work out the number of gradient steps based on the type of
class that is being used. We calculate the number differntly for
printers. However, we should let the Printers class work this out.

Also, the function is very long - I have moved most of the calculation
logic to it's own function.

Made some very small formatting changes to outdev.hxx.

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