Handle SQLite database-busy errors by retrying transactions (fixes #34)

It's possible for a SQLite transaction to hit a SQLITE_BUSY error partway
through (when it first tries to write) because another thread's
transaction got the exclusive lock first. In this situation it has to
back out of the transaction and then retry it from the start.

I added a new status code kCBLStatusDBBusy.

I added CBLDatabase.lastDbError to return the error status of the last
SQLite call, and added a whole lot of calls to it so that we get the
correct status code, so callers can detect a busy error.

-[CBLDatabase _inTransaction:] now handles kCBLStatusDBBusy by retrying
the entire transaction after aborting it, including calling the block
again. It gives up after 10 retries.

I removed the beginTransaction and endTransaction methods and changed
all the callers to use _inTransaction: instead. This took a lot of
gnarly changes to low-level code, especially in TD_Database+Insertion.m.
Catch & report exceptions thrown by map/reduce/filter/validate blocks