Add bitvector_t

Adding a new struct, bitvector_t, to manage an expanding array of bits.

v2: this time with any tests and fewer bugs.

v3: merged commits
b70c831 bitvector: add bv_cstring()
02cc9ec bitvector: add bv_copy()
26f5b58 bitvector: add bv_init()
util: add and use buf_init_ro_cstr()

which is like buf_init_ro() but uses a C string so we can do strlen() to
get the length and pre-set BUF_CSTRING.
util: add buf_init_mmap()

which allows code that mmap() a region to store the result in a struct
buf which can then be buf_free()d later with the expected result of
munmap()ing the data.  This should help us simplify a few interfaces
in the message handling code.

v2: merged
e758e12 fixup! util: add buf_init_mmap()
util: add buf_initm()

which initialises a struct buf to an allocated buffer, taking over
the allocation for later free()ing.
util: add buf_insert() et al

which use the handy infrastructure added for buf_replace*().
buf: copy the correct amount of data in buf_replace_buf
util: add buf_remove()

which removes a range of bytes from a buf.
util: add buf_findchar()
util: add buf_cowappend*()

which will be useful as allocation optimisations in the new message API.
util: fix subtle bug in buf_replace_*()

when given a buf which has been initialised with buf_init_ro_cstr(),
buf_replace_*() will ensure that the target buf is a C string (for
searching) but not that it's writable (for replacing) which are
sometimes but not always the same thing.
Add rfc822tok_t, a tokeniser for RFC822 fields

Needed to parse MIME header fields properly in the new message API.
Add charset_name() and encoding_name()

which are useful for debugging messages.
Move VECTOR_SIZE() to a more useful location
configure checks for MySQL sensibly

using the output of the mysql_config program instead of trying to work
out what the correct -I and -L options are.  Also supports the legacy
options --with-mysql-incdir and --with-mysql-libdir which people are
using in their build scripts to work around the previous brokenness of
--with-mysql.
util: add run_command()

which takes a command line as separate arguments and forks/execs
it, waiting for it to terminate.
seqset: fix _first() and _last() for empty sets
seqset: const correctness

Unfortunately it is not possible to achieve true const correctness with
the seqset_ismember() function which has some weird and unobvious but
necessary semantics which optimise for a common case.
seqset: document the seqset API.

Oh, the horror.
strarray_set(,NULL) doesn't coredump

but it does punch a hole in an array as expected.
Remove index_getsearchtext, it's unused.