Initial tests for setup_db
Refactor setup_db.

* Abstract schema at module level.
* Remove unused `remove_db`.
* Remove unused `main` suite.
* Use `with` aggressively.
* Import modules, not names; simplify imports.
Merge pull request #859 from Renelvon/simple_setup_db

Refactor and initial testing of setup_db