cli: search: Rename options to context

In the next commit the options structure will be extended by
non-option variables. Therefore we need a more generic name.

Just text replacement, no other changes.
cli: search: Move more variables into search_context_t

In order to share some command line options between search and address
subcommands we need to add corresponding variables to the context
structure. While we are at it, we also add notmuch_database_t to unify
parameters of all do_search_* functions and to simplify subsequent
commits.

Otherwise, there are no functional changes.
cli: search: Convert ctx. to ctx->

In the next commit, notmuch_search_command will be refactored to
several smaller functions. In order to simplify the next commit to
verbatim move of several lines to new functions with search_context_t*
argument, we convert all references to this structure to pointer
dereferences. To do so we rename the context variable and use the
original name ctx as the pointer to the renamed structure.
cli: search: Split notmuch_search_command to smaller functions

In a subsequent commit, these functions will be used to share some
functionality between search and address commands.
cli: add support for hierarchical command line option arrays

NOTMUCH_OPT_INHERIT expects a notmuch_opt_desc_t * pointer in
output_var.

The "Unrecognized option" message was moved out of parse_option() to
not be emitted twice or when parsing a non-inherited option.
cli: Introduce "notmuch address" command

This moves address-related functionality from search command to the
new address command. The implementation shares almost all code and
some command line options.

Options --offset and --limit were intentionally not included in the
address command, because they refer to messages numbers, which users
do not see in the output. This could confuse users because, for
example, they could see more addresses in the output that what was
specified with --limit. This functionality can be correctly
reimplemented for address subcommand later.

Also useless values of --exclude flag were not included in the address
command.

This was inspired by a patch from Jani Nikula.
cli: search: Convert --output to keyword argument

Now, when address related outputs are in a separate command, it makes
no sense to combine multiple --output options in search command line.
Using switch statement to handle different outputs is more readable
than a series of if statements.
cli: address: Do not output duplicate addresses

This filters out duplicate addresses from address command output.

It also also adds tests for the address command.

The code here is an extended version of a patch from Jani Nikula.
cli: address: Add --output=count

This output prints how many times was each address encountered during
search.
doc: add notmuch-address.rst to sphinx config

This is needed so that the rst docs are converted to man and info
pages.