Refactored build_cache to cache.py.
This change actually required more work than I thought would be necessary, we:
 * Created a new builders.py module to serve as a module where objects can be created.
 * Abstracted some functions in postgres.py as needed
 * Fixed all imports