Speed enhancement for set search_path()

* Refactor out of _cursor() to perform `set search_path()` once during a request cycle.