Migration::loginAsAdmin
Ensures we have permissions to manipulate pages (gets around access issues with global state). Unfortunately, the creation of a default admin account below is necessary because SilverStripe will reference global state via Member::currentUser() and the only surefire way around this is to login as a default admin with full access.
CAUTION: Since migrations can only be run from the command line, it's assumed that if you're accessing this, then you're already an admin or you've got an incorrectly configured site! TODO: This should be removed soon.
Signature
protected function loginAsAdmin()