OpenSIPS: Fixed possible crash in cachedb module.

This is due to the dialog module mod_init method using the cachedb
module methods before child_init has been called.

In that case, the SQL handled is still set to NULL.

Fixes issue #197.