Engine: max scaling selection considers alternate resolutions

When calculating maximal supported uniform scaling also take possible alternate letterbox and siderborders modes into account.
Engine: moved gfx mode init and shutdown to graphics_mode unit
Engine: fallback to software graphics driver (case 2)

Change to software graphics driver if chosen hardware one could not initialize graphics mode