Only set vary header if the filter check is passed

pulled, fixed, and rebased from #849 - credits to @brightestcircle 
closes #848

note: i'd rather be liberal with the use of `vary`, but i don't think this will break anything since most CDNs only support `Accept-Encoding` in `Vary` headers anyways. if anyone complains, i will revert immediately.

actually, there's a test called `should set Vary at all times`, which this would obviously break. i also need to add a test.

i'll wait for @visionmedia to merge this.