search: remove temp_dir during build
search_engine: add 'compact' API call and use in squatter with -z

This gives a generic "level" argument.  In xapian, that's the tier
number to compress until.  It still needs documentation.
xapian: add multiple tiers with compression

This is a massive patch doing a bunch of things, but they're hard to
disentangle:

1) add 'tiers' infrastructure, where more than one searchpartition can
   be defined, with nice names in imapd.conf pointing to the paths.
   Just for the xapian engine.
2) move latest.x.db inside the xapian directory and call it
   cyrus.indexed.db instead.
3) add a 'xapianactive' user meta file, giving generation numbers to the
   databases on disk and a central point of locking during search, index
   and compress.
4) convert all existing search and index code to use the xapianactive,
   including opening multiple databases for searches.
5) add a new compress function which can atomically (optimistically,
   rather than holding a long lock it does the work and checks if it
   clashed with anyone along the way) combine multiple databases into
   a single database, optionally storing the intermediate form in a
   separate temporary location.

STILL TODO:

* after a successful compress (or at other times) clean up potential
  rubbish left by failed compress runs.  It should be trivially safe
  to delete anything with a lower generation number than the current
  records.
* non-incremental indexing mode, creating a temporary database and
  indexing the UID ranges of all existing databases into there, using
  the same logic as the compress code.
* cleanup mode (optionally during compress) in which all indexed records
  are checked against the mailbox to see that they are not expunged.
  There's no absolute need to make it during compress, in theory you
  could do it to any active database, but compress is easiest because
  it would be on tmpfs.  It may mean two compress phases though, or
  a xapian code change to allow real-time filtering of records during
  the compress run.
sequence: add seqset_firstnonmember API
xapian: false positive unindexed UIDs
squatter: less anal about flags
searchpartition-foo is also a known overflow key
adapt searchpartition-foo for tiers
xapian: use first_nonmember to ensure we never miss messages