Indent according to Varnish coding standards

Thanks to Sergey Syrota for pointing this out.
remove trailing whitespaces
Reindent according to Varnish coding standards.

Thanks to Sergey Syrota for pointing this out.
Move the override handling to the top.

In cases where the override function is used for actual users, not just
testing/overriding, it makes sense to not run the regular expressions.

Reported by: Sergey Syrota
Add Sergey Syrota