Added correct sqlite finalizer for db wrapper when passed a proc