Clean up replicator tests

* The replic8 function had an unused parameter.
* Wait for the replication to save its checkpoint before going on to the next test.
Do away with TDSocketChangeTracker

TDPuller no longer uses the continuous _changes feed mode, only longpoll or one-shot. To avoid latency, it limits the number of revisions in the feed to 100, then parses those and gets the feed again if there's more left.
This means TDSocketChangeTracker is no longer necessary.
More change-tracker cleanup

* Remove remaining support for continuous feed.
* Instantiate TDConnectionChangeTracker directly instead of having TDChangeTracker act as a class-cluster.
* Bump version number to 0.77
Port, auth, Bonjour config for listener

Lots of additions to TDListener:
* Set port to 0 to get a dynamically-assigned port number (access the .port property to find out what it is.)
* Can publish via Bonjour by setting service name/type and optionally TXT dictionary.
* Can require authentication by supplying usernames and passwords.
Limit the number of ?atts_since parameters in a replicator request URL

Fixes #90.
TDConnectionChangeTracker should retry on connection failure/loss.

This is logic that used to be in TDSocketChangeTracker.
Don't store 'null' for JSON of revisions with no custom properties

A revision with no custom (non-underscored) properties was storing a SQL 'null' value in its 'json' column.
It shouldn't do this -- that's reserved for revisions that have been compacted away by the /_compact command.
With the old behavior, a revision with attachments but no custom properties would lose the attachments after the next compact.

Instead, store an empty (zero-length) blob when there is no JSON to store. I had to fix an issue in FMDB to make this work right.
Don't return compacted-away revisions as possible ancestors

The ?atts_since query param sent by TDPuller, and the possible_ancestors property returned by _revs_diff, should not return IDs of any revisions that have already been compacted away. Both of these APIs are used for syncing attachments, and a compacted-away revision has no attachments.
This improves correctness and also reduces the length of the URLs generated by TDPuller (see issue #90.)
Cleanup, and possible fix, of multipart upload code

Trying to address the mysterious error -1021 "request body stream exhausted" when pushing docs with attachments
(Issue #91).
* Moved the length computation code from TDMultipartWriter into its superclass TDMultiStreamWriter.
* Detect and report errors in the input streams the writer is reading from, in case that's the problem.
* Put in some checks to verify the bytes written match the expected length.
* Cleaned up the logic in -read:maxLength:, which I think may have been broken in some circumstances.
Fixed Release build

There was a missing "#if DEBUG" around a property declaration in TDInternal.h,
which broke non-debug builds.
Bumped version to 0.78
Fixed Release build of TouchServ

Was using CollectionUtils, which aren't linked into that target.
Implemented linked documents for views

Support for linked documents: http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views#Linked_documents
Emitting a _id key from a map function will cause include_docs to include the doc with that ID instead.
Note: This is not the most efficient way to implement this.
Fixes #92.
Fixed off-by-1000 error in replicator 'heartbeat' property

Forgot to convert milliseconds to seconds, so 'heartbeat' wouldn't have had any effect.
Change tracker will retry connection if closed by proxy

The AWS Elastic Load Balancer seems to close connections after a brief idle time (45 sec?).
This breaks the _changes feed. The header of the JSON gets sent but no changes, so it's unparseable.
This patch adds code to detect this case and retry after adjusting the heartbeat interval to less than the elapsed idle time.
Bump version to 0.79 (beta candidate!)
Improved: Change tracker will retry connection if closed by proxy

Tweak the heuristic added in 6043f1c by looking at total connection time, not idle time.
Bump version to 0.791.
Fix exception in view query if row value is non-dictionary

Regression introduced by 45f592f (linked documents). Oops.