cli_automation: a sketch of how CLI automation will work

Related to a TMSU bug report, about the inefficiency of batch tagging/untagging
-- calling tmsu many times, instead of calling it once with multiple commands.

This sketch describes a scheme which reads NULL-separated commands,
with individual arguments separated by newlines.
It dispatches based on registration of subcommands -> the first argument in a set must be a subcommand.

To allow global options, the format includes a header.

WARNING: This has not been tested yet, use at your own risk.
Refactor tag functions -> tag submodule, rename/delete/validate_name -> util submodule

Also added tag.discontiguous_tag_ids(), tag.tag_exists(), and a basic CLI allowing
renaming of tags and measuring some tag statistics.
Add a commit-deferral mechanism for CLI automation. Use it in tmsoup.alias CLI.

Functions which would normally commit() should instead call the
do_commit(cursor) function.
If util.defer_commit is False, this will perform the commit immediately.
If it is True, it is up to the caller to correctly commit() before exiting.
Make cli_automation.parse_file actually work, and test it

(you can test it with `python3 -m tmsoup.cli_automation`,
to parse a builtin test script, or
`python3 -m tmsoup.cli_automation SCRIPTNAME`
to parse a script from file.)