Allow spaces in tag names. Use bash arrays more extensively.
In order to allow spaces in completion words, we use newlines only as word
separator in the later parts of the script. For this to work, we have to
have our various word lists as bash arrays instead of space-separated lists.