fix failures introduced by recent refactoring
* * *
[testlib, realdb] we should close connections prior to create a new db using current db as template
sql('DROP FUNCTION IF EXISTS _fsopen(bytea)')sql('DROP FUNCTION IF EXISTS fspath(bigint, text, text)')