BUG Refactor the access checks and initial subsite redirections.

Remove the special AJAX handling to simplify the code. Now redirection
will be forced on any request that changes the subsite to re-synchronise
with the frontend.

Introduce canAccess method, and add it to alternateAccessCheck to make
sure this subsite-specific chceck is also done in situations that are
not captured by onBeforeInit.
Merge pull request #127 from mateusz/refactor-access

BUG Refactor the access checks and initial subsite redirections.