Vary header was being set before filter and other checks were made

I created an issue #848 about this. This moves the setting of the Vary header to after all of the checks are done to decide if we are actually going to compress this response.