Refactor changeset_cache out of formatters

The changeset cache is now in the apidb-specific files, not the formatters.

There are still cache-specific details in main.cpp, but they don't impede
adding backends where the idea of a changeset cache is not applicable.