Add Varnish 4 support

The Varnish configuration template that ships with this module contains a `-w` flag, which no longer works with Varnish 4. This PR adds first steps towards Varnish 4 support by adding version detection and fixing the configuration template.