it will decide the method for disable statement_timeout upon
per transaction or per session, based on how it's called.
When calling with a block, block will be executed and it will use
session based statement_timeout, otherwise will default to existing
behavior.
This removes all orphaned project and namespace routes from the "routes"
table. This is in as a preparation step for removing dynamic route
generation, as discussed in
https://gitlab.com/gitlab-org/gitlab-ce/issues/44390.