Fix #7944 add check/test for localhost in ParseHost

Fixes #7944, adds a test case for `addr` set to `localhost:5000`.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
hmm. Should this constant be here instead of there and we remove the parameter since it's never used? I know that's outside the scope of this change but since we're here...