Add support for a protocol attribute so http and https are both supported
Fixes #82 by simplifying the port resolution in the Domain class.

This commit just fixes #82 by simplifying the port resolution in
the domain class. That affects every place where the URL is
displayed, and solves the problem of when the user copies URLs
with either port 0 or 80, as described in the ticket.

*	modified:   grails-app/domain/docker/registry/web/Registry.groovy
- Just simplifying the port resolution.
[bugfix] Adding test cases for checking the port numbers on the fix #82

This commit adds the two cases that the previous commit verifies.

*	modified:   test/unit/docker/registry/web/RegistrySpec.groovy
- Adding the two test cases to verify the port numbers with 80 and 0.
Merge pull request #85 from christooley/master

Closes #74 Add support for a protocol attribute so http and https are both supported
[bugfix] Refactoring RegistrySpec test cases for the fix #82

Fixing the test cases for the RegistrySpec in regards to the default
port number from URLs. The previous push was still broken. I was
confused with the toURL method, which has the same name as the Java's
URL class.

So this one fixes #82 and makes it ready for merge! Here's the test
execution.

$ grails test-app docker.registry.ui.Registry
Configuring Spring Security Core ...
... finished configuring Spring Security Core
2014-09-19 11:29:26,345 [main] INFO  conf.BootStrap  - Checking for registries in system env
| Tests PASSED - view reports in /home/mdesales/dev/github/docker-registry-web/target/test-reports
Issue #82 don't bother moving invalid ports into url in toUrl()
Issue #82 update test spec description; amend test for default values
Merge branch 'marcellodesales-bugfix/portNumberUrlResolution'

Conflicts:
	grails-app/domain/docker/registry/web/Registry.groovy
Closes #72 set socket & connection timeout on ping
Issue #75 reload after delete
db url in dev env changed to memory
Merge #85 from branches
Closes #75 remove accordion JS
[Really] Closes #75 location.reload() on delete
[Really] Closes #75 location.reload() only on success; make jquery lookup more efficient
Issue #75 reload after delete
[Really] Closes #75 location.reload() only on success; make jquery lookup more efficient
Merge branch '0.9.5' of github.com:atc-/docker-registry-web into 0.9.5