debian:  update ruby binary extension install path

From Christian Hofstaedler, Debian bug 739120:

When ruby-defaults > 1:2.0 will be uploaded to sid, the version of
Ruby provided by the 'ruby' and 'ruby-dev' packages will change to
version 2.0.  This version change includes a change to the path for
binary extensions.

This patch works for Ruby 1.9.1 as well as Ruby 2.0, so it's safe to
apply now.
changelog stanza for 0.17-4
Merge tag 'debian/0.17-4'

uploaded to Debian unstable
emacs: Avoid rebuilding .eldeps even when there's nothing to do

Previously, we updated .eldeps only if the file contents actually
needed to change.  This was done to avoid unnecessary make restarts
(if the .eldeps rule changes the mtime of .eldeps, make has to restart
to collect the new dependencies).  However, this meant that, after a
modification to any .el file that did not change dependencies, .eldeps
would always be out of date, so every make invocation would run the
.eldeps rule, which is both expensive because it starts up Emacs and
noisy.  This was true even when there was nothing to do.  E.g.,

$ make clean && make
...
$ touch emacs/notmuch-lib.el && make
...
$ make
Use "make V=1" to see the verbose compile lines.
EMACS emacs/.eldeps
make: Nothing to be done for `all'.
$ make
Use "make V=1" to see the verbose compile lines.
EMACS emacs/.eldeps
make: Nothing to be done for `all'.

Fix this by replacing .eldeps with two files with identical content.
One tracks the mtime of the dependency information and triggers the
Emacs call to rebuild dependencies only when it may be necessary.  The
other tracks the content only; this rule over-triggers in the same way
the old rule did, but this rule is cheap and quiet.
nmbug-status: replace __values__() with values() in OrderedDict stub

Python dict() object does not have __values__() function which
OrderedDict().values() (the stub provided in nmbug-status) could call
to provide ordered list of values. By renaming this thinko to
values() will make our stub work as expected -- dict items listed out
in order those were added to the dictionary.
ruby bindings message: docstring typo
man: fix typo in notmuch.1

Fix for Debian bug 739556
emacs: Build forwarded message buffer more directly

Previously, we used `message-forward' to build forwarded messages, but
this function is simply too high-level to be a good fit for some of
what we do.

First, since `message-forward' builds a full forward message buffer
given the message to forward, we have to duplicate much of the logic
in `notmuch-mua-mail' to patch the notmuch-y things into the built
buffer.

Second, `message-forward' constructs the From header from
user-full-name and user-mail-address.  As a result, if we prompt the
user for an identity, we have to parse it into name and address
components, just to have it put back together by `message-forward'.
This process is not entirely loss-less because
`mail-extract-address-components' does a lot of canonicalization
(since it's intended for displaying addresses, not for parsing them).

To fix these problems, don't use `message-forward' at all.
`message-forward' itself is basically just a call to `message-mail'
and `message-forward-make-body'.  Do this ourselves, but call
`notmuch-mua-mail' instead of `message-mail' so we can directly build
a notmuch-y message and control the From header.

This also fixes a bug that was a direct consequence of our use of
`mail-extract-address-components': if the user chose an identity that
had no name part (or the name part matched the mailbox), we would bind
user-full-name to nil, which would cause an exception in the bowels of
message-mode because user-full-name is expected to always be a string
(even if it's just "").
emacs: Fix exception when fetching empty or unconfigured settings

When "notmuch config" is called with the name of an empty or
unconfigured setting, it prints nothing (not even a new line).
Previously, `notmuch-config-get' assumed it would always print a
newline.  As a result, when `notmuch-config-get' was called with the
name of an empty of unconfigured setting, it would attempt to
(substring "" 0 -1) to strip the newline, which would fail with a
(args-out-of-range "" 0 -1) exception.

Fix this by only stripping the newline if there actually is one.
emacs: Fix `notmuch-user-other-email' when no other emails are configured

Thanks to the previous patch, this no longer crashes in this
situation, but now would return ("").  Fix it to return () when no
emails are configured.
man: escape backslash in notmuch-tag example

The example was originally intended to have a literal backslash in it, but
'\ ' is interpreted by nroff as a non-breaking space.

It doesn't make much difference to the example, but the non-breaking
space triggers a bug in doclifter.
emacs: remove newlines from input to notmuch count --batch

Since a newline starts a new query in batch mode, this causes
mysterious crashes in the emacs interface if saved searches contain
newlines.  See the discussion at

      id:87wqhcxb5j.fsf@maritornes.cs.unb.ca

In general newlines seem to be just whitespace to the xapian query
parser, so this should be mainly harmless.
cli: command line option parser cleanup

Reduce the indentation for clarity. No functional changes.
test: Simplify CLEAN list construction

Construct as much of the CLEAN list from TEST_BINARIES as possible,
rather than duplicating this information by hand.