Fixed winning-revision rule for conflicts

If there are conflicting revisions the one with the greater revid "wins" and is returned by default.
The problem is that CouchDB has a specific definition of "greater" for revIDs -- basically, the numeric prefix is parsed as a number, not as ASCII. This only makes a difference for revisions with generation numbers greater than 9.
For compatibility, I've added a custom collation for rebids that matches CouchDB. This fixes #10.
Merge pull request #38 from fcandalija/master

I think this fixes #37.
Allow GET of attachment whose name contains "/"s

...without having to escape the '/' characters, that is.
This fixes #40.
Fix some compile errors

- Some implicit 64-to-32-bit conversions in the 64-bit build
- Missing call to [super dealloc], reported by newer version of Clang compiler.
Create fewer temp directories during attachment download

Was creating a new temp dir per attachment; now just creates one per database. Still not sure why these dirs are being left behind, but I've asked about it on cocoa-dev.
Added test TDPuller_FromCouchApp

This is for testing issue #39. I can't reproduce it myself.
Added Apache license comments.

(No code changes.)
iOS on-device fixes

* Fixed iOS demo target settings so it'll run on a device without getting entitlements errors.
* Fixed paths to temp files generated by unit tests since /tmp isn't accessible on a real iOS device.
Better handling of "possible_ancestors" in replication

* Implementation of _revs_diff API now returns the possible_ancestors arrays.
* Pull replication sends better list of revs in "atts_since" key.
TDRouter honors ?atts_since in document GET requests

An optimization to avoid sending unnecessary attachments that the caller already knows about, while being passively pulled from.

Also some small refactoring:
* Moved +parseRevID: from TDDatabase to the more-appropriate TDRevision.
* Created +[TDDatabase stubOutAttachmentsIn:beforeRevPos:] from some former static functions in TDPusher.
Make filters work for push replications

TDPusher already had a 'filter' property but it wasn't being set by TDRouter.
While I was at it, I refactored the 'filterName' and 'filterParameters' properties from TDPuller up to TDReplicator, so TDPusher can use them too.
Oops, hadn't updated MYUtilities submodule to correspond to a new commit in that repo

Fixes #43.
Work around OS bug in NSJSONSerialization

Fixes issue #44.
Replicator will retry HTTP requests that fail with a 5xx error
Oops, fix crash in the new retry code

It shouldn't be clearing _request, just _connection.
Bump version to 0.61 for alpha2 candidate.
Fix a crash with replication after closing a database

TDDatabase wasn't unregistering itself from replication notifications in its -dealloc method, so after a database has been dealloced any notification from any replication would likely cause an exception or crash.
Fixed missing response for some failing REST requests

Nasty bug fixed: TDRouter would react to some errors (like a request to a nonexistent database, or an invalid document ID) without returning an HTTP response, so the caller's request would fall on the floor and eventually time out.

Also improved the TDRouter unit tests to catch this type of problem.
Replicator now properly escapes slashes in doc IDs
Offline support

TDReplicator detects when the remote host becomes reachable/unreachable, usually as a result of the device going on/offline. Replication is stopped when offline and restarted when back online.