Improve cross window changes test using test.html

using the testsuite for foreign tab post
Cross window changes test uses test parameters
added adapter-level db connection cache
use one EventEmitter per database, instead of one per instance
set opts.seq from opts.since properly

toString.call(int) is silly and returns "[object Number]"
Merge pull request #162 from jo/master

Improve cross window changes test
fix some typos and style things

- s/pouch/Pouch/
- s/console.err/console.error/
fix broken browser tests
working http adapter for node

- added request and underscore as dependencies
- underscore swapped in for jquery under node for some helper functions (_.extend)
- when running under node, ajax requests go through request
added http adapter to tests, and get test.views.js working
pass errors directly to callback
attachment replication

- moved ajax function into pouch.utils
- JSON parsing of results depends on content-type and "JSON-sniffing" to avoid parsing non-JSON responses (e.g. attachment text)
- added atob and btoa to pouch.utils
ajax calls options.success/options.error if present
test.auth_replication.js runs and tests pass
fix allDocs, and destroy when no callback is given

This is a workaround for levelup issue#6: https://github.com/rvagg/node-levelup/issues/6, where the last parameters given to readStream stick as the default parameters on subsequent calls. This causes `changes`, which filters the leveldb stream, to interfere with `allDocs`, which usually wants an unfiltered stream.
remove default end option from stream, since we never specify the end point

setting end to Infinity has the unfortunate side-effect of filtering out documents with non-numeric keys
catch real errors (conn refused, etc) earlier
set package entry point to pouch.js
wrap callbacks with call helper
add a section on node to the readme