Only process response if the request reached htmlmin

Django calls process_response for all middlewares, leading to performance problems with htmlmin in combination with a Cache middleware: the minified response is cached and delivered from cache, but minify still runs on it again.

This patch introduces a flag in the Request phase and checks it in the Response phase and only minifies when the request has also hit the middleware.