Ports middleware to Django, and adds repo sync view

This adds two new middleware packages for Django, and fixes one issue with the auth_required decorator. The DjangoExceptionHandlerMiddleware is done with a new codepath because a lot of the web.py code is web.py specific. The DjangoPostponedOperationMiddleware shares a codepath between Django and web.py.

To test these middlewares, the repo sync view was added, and that is working correctly also.