Add session starting logic to checkCacheCommands.

This fixes the case when cache is not flushed in live mode.
The session hasn't been started yet so there's nothing in there.
`$hasPermission` becomes false in that case.
Don't cache ErrorPages

This ensures that the http response codes are set correctly.
Refactor session starting logic to be in one place
Merge pull request #14 from Focus-Flow/bug/dont-cache-error-pages

Don't cache ErrorPages
API Extend ErrorPage detection to work on subclasses of ErrorPage
BUG Fixed issue with cache clearing not respecting flush protection
API DynamicCache now depends on cms module
Fixes #12
Merge pull request #13 from Focus-Flow/bug/cache-flushing-when-live

Add session starting logic to checkCacheCommands.
BUG Fixed issue with SecurityToken
Re-enabled security token and substituted the token into all cached results