Support writing notedb data into a separate set of repositories

We want adventurous server admins to be able to experimentally turn on
writes for notedb data soon, long before notedb is ready for
production use. However, there are some performance concerns, such as:

 - Doubling the number of refs in every repo.
 - Increasing GC cost.
 - Reduced object locality within packs.
 - Creating lots of garbage (including loose objects) as the notedb is
   regenerated.

Some of these performance issues we will need to address in JGit (e.g.
by modifying the repacker), and some might not turn out to be so bad.

For improved isolation during this transitional period, allow for
storing all metadata in a separate repository from the main one. This
can have a separate repack schedule and can be safely blown away as
necessary.

In the local disk case, metadata repositories are stored by default in
$site_path/notedb. We are not committing to this location long-term,
and there is an undocumented configuration option that may change.
Adventurous admins are responsible for rebuilding the notedb and
cleaning up garbage if this configuration changes.

Change-Id: I8158e3f46eb8378ca1726cf6bad67efa669b40d9
8 files changed