Validate tag names similar to repository name validation; add tests

Addresses #7943

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Lets move this regex to be a package level variable so that it's compile only happens once.