[feature] add support for connection close hooks
Adds support for adding user-supplied connection close hooks to the driver, for example in order to call "PRAGMA optimize" on each connection close (https://www.sqlite.org/pragma.html#pragma_optimize).
Also adds checks for nil supplied functions to both of the connection and close hook register functions, as in my opinion it's better to panic during register (early in execution) than later during attempted connection hooking.