Combined amnuts Pull Request #152 with baio's #26, plus a regex accepted characters option

Pull request #152 added a couple useful options to the autocomplete functionality.  Pull request #26 added tag length and count restrictions as well as a few other slight improvements.  I needed both in my implementation so I merged their changes into my fork.  They overlapped a bit on the autocomplete thing, so I handled the merge.

Lastly, I added the ability to present a regular expression which validates individual keystrokes within a tag.  If present, it stops keystrokes that do not match the regex pattern given.  It does not affect tag creation characters, however, if you want to use spaces with your tags, you must turn on "allow spaces", as well as add a space into your regex pattern.

Note: this is my first ever pull request.  Please give advice as you see fit.  I think I did the merges wrong when pulling Amnut's and Baio's changes, so many more lines than I had expected have bsingin64 on the blame instead of their code.  Not sure how to handle that.  Obviously credit is due to those two contributors for the majority of that code.  I only lay claim to the regex addition.