Middleware support

In our project it turned out to particularly useful to pass configuration from middleware.

Example usage:
	class JavascriptSettingsMiddleware(object):

		def process_request(self, request):
			request.javascript_settings = {}

		def process_template_response(self, request, response):
			request.javascript_settings['api_url_friend'] = '/api/v1/friend/'

			return response