Add call_func_with_subsite() and fix bugs related to $_REQUEST['SubsiteID']
Add call_func_with_subsite() and fix bugs related to $_REQUEST['SubsiteID']

BUG 1: there appears to be a situation where $_REQUEST['SubsiteID'] is
set but without a meaningful value. This means that
(int)$_REQUEST['SubsiteID'] returns 0 and currentSubsiteID() returns
the incorrect Subsite.

BUG 2: currentSubsiteID() always values the $_REQUEST over the session.
This means that, if the Subsite is changed when there is a SubsiteID in
the request, the original SubsiteID is returned instead of the current
ID.

petpack/silverstripe-subsites,petpack/silverstripe-subsites