Varnish 4.0 support

Tested on varnish-4.0.1 rev. 4354e5e, Linux 3.2.0-4-amd64.

I'm new to Varnish, so let me know if I missed something!

Side note: the official VMODs all seem to use the master branch for Varnish 4, and a separate branch for Varnish 3, but then set the default branch to the Varnish 3 one. Seems like a reasonable thing to do.