This class generates all URLs for Gallery based on the auto-detected protocol, hostname, URL
path and the given GALLERY_MAIN_PHP. Handles normal standalone as well as embedded and multisite operation when some URLs need to go to the Gallery codebase directly. Also handles the navigation (history) together with GallerySession. All auto-detected URL parts can be overrided with the init() parameters (originating either from the optional config.php parameter 'baseUri' or from GalleryEmbed).