Added a simple performance test to the iOS demo app target

It just creates, indexes and queries a few thousand documents.
Turn on FMDB SQL statement caching -- significant speedup for DB ops.

Testing on an iPod Touch, I saw a 20-30% speedup in some db-heavy
activities like creating docs en masse or big replications.
Optimization: Don't fetch _attachments if there are none

Document lookup incurs a wasted extra SQL "SELECT FROM attachments..."
if the revision has no attachments. To avoid this, I added a flag
revs.no_attachments that's true if the revision has no associated row
in the attachments table. When the revision is loaded, this flag in
turn sets a CBLContentsFlags flag kCBLNoAttachments, which indicates
that the _attachments dictionary shouldn't be populated. (This flag
could be used in other contexts where the caller doesn't care whether
the doc has attachments.)
Optimization: In-memory docID cache

Use an NSCache to map docID strings to the internal numeric IDs
(the row numbers in the ‘docs’ table.)