notmuch-restore: add support for input format 'batch-tag'
This can be enabled with the new --format=batch-tag command line
option to "notmuch restore". The input must consist of lines of the
format:
+<tag>|-<tag> [...] [--] id:<msg-id>
Each line is interpreted similarly to "notmuch tag" command line
arguments. The delimiter is one or more spaces ' '. Any characters in
<tag> and <search-terms> MAY be hex encoded with %NN where NN is the
hexadecimal value of the character. Any ' ' and '%' characters in
<tag> and <msg-id> MUST be hex encoded (using %20 and %25,
respectively). Any characters that are not part of <tag> or
<search-terms> MUST NOT be hex encoded.
Leading and trailing space ' ' is ignored. Empty lines and lines
beginning with '#' are ignored.
Commit message mainly stolen from Jani's batch tagging commit, to
follow.