perf-test: propagate non-zero returns from /usr/bin/time

Unlike in the correctness tests, the most common cause of non-zero
return seems to be the user interrupting, so killing the run seems
like the friendly thing to do.
perf-test: add argument parsing for performance tests

This patch just sets (non-exported) variables. The variable $debug is
already used, and $corpus_size will be used in following commits.
perf-test: add corpus size to output, compact I/O stats

Austin suggested a while ago that the corpus size be printed in the
header. In the end it seems the corpus will be fixed per test script,
so this suggestion indeed makes sense.

The tabbing was wrapping on my usual 80 column terminal, so I joined
the input and output columns together.
perf-test: optionally print description for each group of tests

Output from tests is indented slightly in the same style as the
correctness tests.
perf-test: cache unpacked corpus

Unpacking is not really the expensive step (compared to the initial
notmuch new), but this is a pre-requisite to caching the database.
perf-test: add caching of xapian database

The caching and uncaching seem to be necessarily manual, as timing the
initial notmuch new is one of our goals with this suite.
perf-test: update README

Describe new argument parsing and mention cache handling routines.
perf-test: bump corpus version to 0.3

The new version ships with some tags, and an updated archive of the
notmuch mailing list.
perf-test: unpack tags.

There is only one set of tags, independant of the size of message
corpus chosen.
perf-test: split basic into 00-new, 01-dump-restore, and 02-tag

We use the new "time_start" function to restore the database from cache
if possible.
perf-test: use nmbug tags in dump-restore tests

This makes the tag set a bit less trivial.

Note that if you use the small corpus, this is not so interesting (and
is also a bit noisy) since the messages will not be found. In the
future this could be checked for.

Conflicts:
	performance-test/01-dump-restore
emacs: Fix bug in resynchronizing after a JSON parse error

Previously, if the input stream consisted only of an error message,
notmuch-json-begin-compound would signal a (wrong-type-argument
number-or-marker-p nil) error when reaching the end of the error
message.  This happened because notmuch-json-scan-to-value would think
that it reached a value and put the parser into the 'value state.
Even after notmuch-json-begin-compound signaled the syntax error, the
parser would remain in this state and when the resynchronization logic
reached the end of the buffer, the parser would fail because the
'value state indicates that characters are available.

This fixes this problem by restoring the parser's previous state if it
encounters a syntax error.
contrib: pick: archive message updated

Update pick's archive message to respect notmuch-archive-tags. Also
split archive message into an archiving part and a separate
"then-next" part, to move more inline with show. Update the keybinding
so default behaviour is unchanged.
emacs: Centralize notmuch command error handling

This provides library functions for unified handling of errors from
the notmuch CLI.  Follow-up patches will convert some scattered error
handling to use this and add error handling where we currently ignore
errors.
emacs: Use unified error handling in notmuch-call-notmuch-process

This makes notmuch-call-notmuch-process use the unified CLI error
handling, which basically refines the error handling this function
already did.
emacs: Factor out synchronous notmuch JSON invocations

Previously this code was duplicated between show and reply.  This
factors out synchronously invoking notmuch and parsing the output as
JSON.
emacs: Improve error handling for notmuch-call-notmuch-json

This checks for non-zero exit status from JSON CLI calls and pops up
an error buffer with stderr and stdout.  A consequence of this is that
show and reply now handle errors, rather than ignoring them.
test: Test show's handling of subprocess errors
emacs: Use unified error handling in search

This slightly changes the output of an existing test since we now
report non-zero exits with a pop-up buffer instead of at the end of
the search results.
test: Test search's handling of subprocess errors