Use macros instead, add some safeguards.
Use macros instead, add some safeguards.

Inspired by pull request to libvmod-ipcast from Martin Probst.

mbgrydeland/libvmod-fsbackend,Dridi/libvmod-example,Dridi/libvmod-example,aondio/libvmod-rtfrontend,aondio/libvmod-rtfrontend,aondio/libvmod-rtfrontend,aondio/libvmod-cowsay,varnish/libvmod-example,aondio/libvmod-cowsay,mbgrydeland/libvmod-fsbackend,varnish/libvmod-example