Registry tests

Added unit/integration tests for pull, push and login.
This changeset also allows overriding the index URL using the `DOCKER_INDEX_URL` environmnent variable.