Replace reversion middleware with api view mixin.

This is done because django 1.6 has transactions at view level and
current authentication is done at view level instead of using django auth
middleware.
Put a unified way to generate history to issues and user stories.