update nginx configuration for auth_basic

This PR does a couple of things:

1) any HTTP requests are permanently redirected to HTTPS
2) add workaround for #170
3) add htpasswd file for basic authentication
4) everything but GET requests require authentication

Point 4 is especially important. Users that are not authenticated with the registry can pull images, but they must authenticate in order to push new images. If you guys are unhappy to have that as the default behaviour, I can easily make the change to use authentication for all requests to the registry (except for `/_ping` and `/v1/_ping`, of course).