Following up on r1660610, add another pool cleanup handler tohandle the case where the root pool is cleaned up beforethe state pool.This should fix the problems in the swig bindings.* subversion/libsvn_subr/sqlite.c (function_wrapper_baton_t): Hold state pool reference. (clear_sqlite_function_scratch): Add forward definition. (clear_sqlite_function): Rename to... (clear_sqlite_function_state): ... this. Reset registration. (clear_sqlite_function_scratch): New function. (svn_sqlite__create_scalar_function): Add second registration.