Fixes #135: LeftAndMain switching between subsites

When trying to switch to a different subsite from a page's editing view, it wouldn't switch. This was partly due to a $record always existing due to the homepage fallback on currentPageID : https://github.com/silverstripe/silverstripe-cms/blob/3.1/code/controllers/CMSMain.php#L816

So as currentPage() couldn't actually be used to test for the existance of a current page, I've added in a check for isset($this->owner->urlParams['ID']).

I've also moved the check for $_GET['SubsiteID’] which indicated a forced subsite switch (eg. via the dropdown switcher) above the check for a current page, as it should take precedence, and it wasn't being run when both conditions matched causing the subsite not to change.

Tested changing subsites from /admin/pages, from page edit view, from a page edit URL, and from other CMS sections such as Files and Security, and all seems to be working perfectly now.
Update master-alias to follow stable release versioning
Merge pull request #145 from purplespider/patch-2

Fixes #135: LeftAndMain switching between subsites
Automatically add main url to host-map.php

If subsites is used in conjunction with staticpublishqueue, host-map.php currently has to be manually edited to include the main website's base URL every time a Subsite record is saved. Using these modules together already requires FilesystemPublisher::$static_base_url to be set, so we may as well make use of this setting if it is available to save this manual editing.