More replicator improvements

* Created a TD_DatabaseManager method to create replicators

Conflicts:
	Source/TDReplicatorManager.m
	Source/TD_DatabaseManager.m
Dumb bug fixes (TDReplication, TDBrowserIDAuthorizer)

Conflicts:
	Source/API/TDReplication.m
Change tracker needs to send cookies in its request

TDSocketChangeTracker uses CFHTTPMessageCreateRequest, which is too low-level to use the shared
cookie store, so it doesn't send any cookies. This breaks BrowserID auth, which is session-based.
Fixed this by explicitly getting the cookies from the NSHTTPCookieStore and adding their headers.
More BrowserID work (don't store assertion in database)

BrowserID assertions are extremely short-lived, so it doesn't make sense
to store them in a persistent replication's document. Instead, store the
email address only. The assertion is registered with the authorizer
before starting replication.

Conflicts:
	Source/API/TDReplication.h
	Source/API/TDReplication.m
	TouchDB.xcodeproj/project.pbxproj
Oops, I broke replication with that last commit

Fixes #219
Fix a path-escaping bug with replication

Regression from the initial BrowserID patch (649d14f)
BrowserID improvements

* Parse email address out of assertion rather than requiring it to be provided separately.
* Also get the expiration date, and don't return assertions that have expired.

Conflicts:
	Source/API/TDReplication.h
	Source/API/TDReplication.m
Fix a path-escaping bug with replication

Regression from the initial BrowserID patch (649d14f)
bug fix: setting an attachment's body to null should delete the attachment
TDModel autosave delay is now extendable

Just override -autosaveDelay in your TDModel subclass.
(Default value is 0.0.)
Allow nonpersistent TDReplication to be started again if it stops

Also made the -stop method work.
Internal change notification improvements

Created a TD_DatabaseChange class to encapsulate info about a new
revision. Added a flag that indicates whether the document may be in
conflict (not used yet.)
Fixed regression where persistent TDReplication never notified

Persistent TDReplications were never posting progress-changed
notifications. Fixed now.
Fix crash in TDJSViewCompiler

The compiled function objects were getting GC'd, after which calling them would crash.
Fix crash in TDJSViewCompiler

The compiled function objects were getting GC'd, after which calling them would crash.
Don't do reachability checks on replication to a local touchdb: URL.

Fixes #228
Merge pull request #225 from pegli/public-api_delete-attachment

[public-api] bug fix: setting an attachment's body to null should delete the attachment
Added TDReplication.credential property

This is a convenience for getting/setting the Keychain login credential.
Make sure views compiled from JS get rebuilt if the map/reduce fn changes

…Although currently this only takes effect next time the app is launched, i.e.
it isn't watching for edits of the design docs while running.

Also moved the code that triggers the compilation out of TDRouter and into
TD_View and TD_Database.
Merge branch 'master' of github.com:couchbaselabs/TouchDB-iOS into public-api

Conflicts:
	Source/TDReplicatorManager.m
	Source/TD_Database.h
	Source/TD_Database.m
	TouchDB.xcodeproj/project.pbxproj