Write attachment MIME bodies in an order CouchDB will understand

In a multipart PUT, CouchDB expects that the order of the attachment MIME bodies is the same as the order in which the metadata objects appear in the JSON _attachments dictionary.
Go to some extra work to make the orders match.
Also add extra headers to attachment MIME bodies (Content-Length, Content-Type, Content-Encoding).
Fixes #133 (I hope) and possibly some other bugs too...
Fix new leak in TDReplicatorManager

Introduced by commit 997bb36.
Fix JSON collator bug comparing numbers

Comparisons of numeric JSON values could sometimes randomly be wrong,
due to garbage digits past the end of the input strings.
Fixes #138.
Added TDView.mapContentOptions property

This enables the map function to see special doc properties like _update_seq.
Fixes #139 (when combined with the change I'm about to commit to CouchCocoa.)
Oops, last commit should use _local_seq, not _update_seq
Bump version to 0.931 (beta 4 candidate)
Don't include deleted/resolved revisions in conflicts
When stopping a replication, stop its HTTP requests

TDReplicator now tracks all of its active TDRemoteRequests,
so it can tell them all to stop if its -stop method is called.
Fixes #141
Limit number of revs pusher sends at once

Pusher will send revs in batches of 100 even if a huge number of revs
have been added locally since the last checkpoint (or on initial sync.)
Fixes #143
Remove obsolete warning "Encoded attachment bigger than original"
Avoid infinite regress stopping replication

Fixes #144 (I think)
Stop remote requests when replicator goes offline

Also some minor cleanup of the goOnline/goOffline logic.
Hopefully this fixes #137.
_changes was returning wrong revisions when style=_all_docs

With ?style=all_docs&limit=nnn, the results were clipped to the limit _before_ being sorted by sequence,
so the wrong set of results got returned. This screwed up a remote server trying to pull from this database.
Fixes #131
Add info about active HTTP requests to _active_tasks

New task property "x_active_requests" is an array of dictionaries.
Each dict has properties "URL" and "method" that describe the request.
Merge pull request #142 from fabien/fix

Don't include deleted/resolved revisions in conflicts
Oops, fix exception returning _active_tasks

Stupid regression introduced earlier today by d7fa11c406fb.
Fixes #145
Bump version to 0.95 (post beta 4)
Enable full iOS file encryption, and read-only database access

Ensure iOS database & attachment files are encrypted and inaccessible until the app's been launched.
(The default encryption is based on a 'device key' that can be cracked if there's physical access to the device so it can be jailbroken.
Switched to CompleteUnlessOpen encryption, which uses a key derived from the user's passcode and prevents access unless the
device is unlocked. I deliberately did not go with Complete encryption because then files would become inaccessible as soon as
the device were locked, which would break any sync or other activity while the app continues running in the background.)

While I was at it, I added a '.readOnly' property to TDDatabase and TDDatabaseManager. This enables opening a database in
SQLite read-only mode. Not generally useful but I want to use this as an option in tools for examining databases.
Honor _deleted flag of docs inserted by TDPuller

Otherwise a deleted formerly-conflicting revision could get inserted as non-deleted.
Fixes #148 (read it for the details)
Allow authorization in replicator tests