Fix filter and add vary: Accept_Encoding to header
Fix filter and add vary: Accept_Encoding to header

Filter was being performed before cleanup which was not right, and
Vary: Accept-Encoding is supposed to improve cache performance on some
proxy servers (according to PageSpeed).

dtex/spas,sntran/spas