(#926) - HTTP Basic Auth for Userinfo in the url.

Before, HTTP Basic Authorization header was set only when user/password
were passed in the opts object for the instantiation of PouchDB, now
http://user:password@host works also.
(#789) - Count pending revisions in a correct way

When multiple conflicting revisions for some id were present on a remote
database, `pending` variable was incremented only by one to account for
the document itself, but it was then decremented for every conflicting
change. This effected in negative `pending` value, which in turn meant
that `completed` callback was never called (due to `pending === 0` being
false).

This change modifies semantic of `pending` variable to count revisions
to process instead of documents. Calculation of `docs_read` was changed
as well, because it should include all fetched documents, including
conflicting revisions - until now it was counting something else than
`docs_written`, so a situation when `docs_written !== docs_read` was
possible (which should not happen, in general, `docs_read ===
docs_written + docs_write_failures`).
Merge branch 'master' of https://github.com/daleharvey/pouchdb