(fixes #236) - url reformating

This solves a bug when initializing nano with a url with databasename, which
also occurs somewhere else in the url, eg. in the username.
Also makes it possible to use nano with couches which are exposed from a
subdirectory, eg the server lives at http://example.com/couchdb.

With tests.