Add database queue & doTransactionWithBlock method

The goal is to replace beginTransaction and commitTransaction with a routine including queue management.
Managing a queue avoids the risk of having two SQLite transactions getting nested, which is illegal.
Implement the use of the new transaction block routine

Replace calls to beginTransaction and commitTransaction, calls to @synchronized(db).
Slightly modify some transaction borders.
beginTransaction and commitTransaction are private from now
Serialize accesses to sqlDatabase.

The access is serialized through the combination of another queue and dispatch_sync.
Inspired by Brent Simmons’ article <http://www.objc.io/issue-4/SQLite-instead-of-core-data.html> and FMDatabaseQueue.
After fetching a feed, run callback routines asynchronously.
Code cleanup
Prevent lock when deleting folder
Minor optimizations
Restore 32bit compatibility
Systematically close FMResultsSet when they are not needed anymore
Merge pull request #282 from barijaona/transaction-blocks

Move database writes on fetching feeds to a background thread