Create varnish invalidation function _before_ the trigger using it

Also add documentation about the cdb_invalidate_varnish function