Optionally start minimized to tray 

Restores mimized to tray if it was closed as such and adds an option to
force starting mimized to tray (if a tray is available). Fixed #1133