[BUGFIX] Fix security-related functional test failures
The change I724c1b352dd1807ba53b1e336f2d90e90360ff4d introduced some
test failures. This change takes care of the failing functional tests.
It does that by:
- changing the order in which security is set up in the
FunctionalTestCase provided by Flow.
- setting the "current request" again after a call to clearContext() in
- adjusting the expected exception in MethodSecurityTest in two places