Line up tag, push, build and commit's tag patterns with each other.

Please note before anything that this is my first serious foray into the docker source, so please just be aware I'm happy to accept criticism or requests for rewrites.

I think this solves #4340 -- it unifies tag and image name validation into a single regex, which is then applied to the tag, build, push, and commit's command functions. Additionally the function used is generalized in utils.ValidTag and utils.ValidTags (a list version to do multiple comparisons at once).

Please let me know if I can / need to change anything!