mw: make ApplyPolicies return an error
mw: make ApplyPolicies return an error

This will make unit-testing it possible. Also, do error if UpdateSession
errors or if we fail to find a policy by its ID.

lonelycode/tyk,lonelycode/tyk,lonelycode/tyk