ApiMiddleware.handleAction now records request in context object of handler promise.
This allows handlers to access the request (useful for accessing session etc.). This
solution is much cleaner than passing request somehow as bundled argument through
promises (which I tried but it didn't work due to circular references somewhere) and
places no extra restrictions on behaviour of handler promises (they can safely ignore
this change).