Refactored CouchChangeTracker.

Change-Id: I39a7c4da61c9990ded6059650b73a32b37a6835e
Some random fixes/improvements

* Added -[CouchServer checkActiveTasks].
* Optimization and leak-fix for CouchQuery.
* Fix for CouchReplication

Change-Id: I2e1b1a4aa1d56fafb9ed08c2affcc43fb085a07f
Get new doc ID from 'id' field of response

After POSTing to a database, get the new document's ID from the 'id'
field of the response body, not just from the "Location:" header.

Change-Id: I15002af869e00065b6ddd3c1e9bca43fe42250a8
Fixed a leak in connection:didReceiveAuthenticationChallenge:.

Change-Id: I4dd6747778d8622ed0185a312b227a66efa30849
Added CouchTouchDBServer

This is a convenience for working with TouchDB, much like CouchEmbeddedServer is for the existing Couchbase Mobile.

Change-Id: I24f7dc34d362e5cbfc585a72abbf136276ce6dca
Don't build CouchEmbeddedServer in the iOS framework

It will cause a link error if the app doesn't use Couchbase.framework (i.e. uses TouchDB)
and links with the -objc flag, which prevents dead-stripping of classes.
This is going to make it difficult to have a single CouchCocoa binary that supports both
Couchbase.framework and TouchDB :-(

Change-Id: I5b1252dc49809d6bf4b103912b3945609636d799
Switch Mac framework to use latest SDK

And fixed a compiler issue with RESTBody using the 10.7 SDK.

Change-Id: Id22c4d7cada0e6f6911771b94f4dc1d2465018f5
Keep CouchChangeTracker from warning in an apparently legal edge case

Change-Id: I83fff237fd4e044a095dd990b20e5920e9574b8d
Avoid polling /_activity in CouchTouchDBServer

Instead it can listen for notifications from TouchReplication.

Change-Id: If0749434ac6fa8aa0c8e6cdfdc6fba41cd22a6c5
Re-implemented CouchDesignDocument_Embedded to use TouchDB

Change-Id: Ib49c5309f8675c0338241955ba66b671aec0e555
Don't stop a replication when its CouchReplication is dealloced

Change-Id: I6f74582d24412a22ecc9bc71cf8344aea8fd1a89
URL query params containing an "&" weren't properly escaped.

Change-Id: I752c4ae2b4a540fe44dc1a41b2d4a863a5c67cdb
Bug-fix for a race condition in CouchReplication.

Change-Id: I557a7e31053ae149339f778ac26f05e684de4b2d

Conflicts:

	Couch/CouchReplication.m
Added doc-comment about auth (401) problems with CouchDB.

I don't know of a good solution that CouchCocoa can implement, so I'm recommending changing CouchDB's config to send the proper auth header.
Merge branch 'master' into touchdb

Conflicts:
	Couch/CouchDocument.m
	Couch/CouchReplication.m
	CouchCocoa.xcodeproj/project.pbxproj
	REST/RESTInternal.h
	REST/RESTResource.m
	Test/Test_REST.m

Change-Id: I3996f9ccbcd134a4cb32d74eb6e774818405d37a
Merge branch 'master' into touchdb
Fixed some #imports.

Change-Id: I6e39cc5a819ab2ea61e920f870da45401fe9ea85
Updated framework build scripts to work inside TouchDB workspace

The build-fat-iOS-library script had some problems when two targets in the same workspace were using it, due to a collision in the naming of a temporary directory.
Fixed a leak and a build error

* Added a necessary -dealloc method in CouchQueryRow.
* Changed debug symbol style to avoid an annoying error the 2nd time building the iOS framework.

Change-Id: Iff9ebc2e6384a5a444d36c1c0a5df1a0b9394c07
Merge branch 'master' into touchdb