emacs: make sure tagging on an empty query is harmless

Currently notmuch-tag throws a "wrong-type-argument stringp nil" if
passed a nil query-string. Catch this and provide a more useful error
message. This fixes a case in notmuch-tree (if you try to tag when at
the end of the buffer).

Secondly, as pointed out by David (dme)
`notmuch-search-find-stable-query-region' can return the query string
() if there are no messages in the region. This gets passed to notmuch
tag, and due to interactions in the optimize_query code in
notmuch-tag.c becomes, in the case tag-change is -inbox, "( () ) and
(tag:inbox)". This query matches some strange collection of messages
which then get archived. This should probably be fixed, but in any
case make `notmuch-search-find-stable-query-region' return a nil
query-string in this case.

This avoids data-loss (random tag removal) in this case.
doc/conf.py: Remove _static from html_static_path

Avoid:

  $ make HAVE_SPHINX=1 sphinx-html
  python ./doc/mkdocdeps.py ./doc doc/_build doc/docdeps.mk
  sphinx-build -b html -d doc/_build/doctrees -q ./doc doc/_build/html
  Making output directory...
  WARNING: html_static_path entry '/home/wking/src/notmuch/notmuch/doc/_static' does not exist

because we have no static source in doc/_static.
Unset html_static_path in Python bindings docs

html_static_path is a kind of source directory and it was set to
destination directory (../html) which caused infinite recursion with
Sphinx 1.2 and above.
build: fix order of rpath

In my system `pkg-config --libs talloc` returns
'Wl,-rpath,/usr/lib -ltalloc' (probably wrongly) which causes the final
LDFLAGS to be something like '-Wl,-rpath,/usr/lib
-Wl,-rpath,/opt/notmuch/lib', which causes the RUNPATH to be
'/usr/lib:/opt/notmuch/lib', so basically defeating the whole purpose of
RUNPATH.

I noticed this when my /opt/notmuch/bin/notmuch (0.17) started updating
the database after I updated the system (which updated the system's
notmuch). This shouldn't happen.

Let's move the RUNPATH flags before other external flags have a chance of
screwing the build.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>