Refactor out calls to RequestContext::getMain()

While trying to write unit tests against the API i ran into a problem,
namely that RequestContext::getMain()->getUser()->getName() always returned
127.0.0.1 regardless of the user provided to the api in the unit
test.  This is because the main request context is the wrong context.

Thankfully during the api output refactors we used the context throughout, the
only changes necessary were to pass the correct context from the Action and API
wrappers into the block instances, so they could pass it on to the formatters.

This additionally adds a POC test for ApiFlowLockTopic demonstrating that we
can now pass in a priveleged user and perform priveleged actions.

There is still some mess left behind,  namely the value user value in the
container which is used in some classes.  I think the best solution here is
going to be to remove all static calls to Container, and instead create the
container on entry from API or Action specifically for that context.  One
container per context, so everything inside points to the right values.  But
that will require several patches removing calls to Container::get, and probably
passing containers directly into the block instances.

For now this appears to work, and this isn't actually a problem we've ever seen
in production, its a theoretical problem that is affecting testability.

Change-Id: Ia22eb12f2bfc5c5e3356a021b6df960fd26290cf