Fixed activityIndicator spin problem + tracing

The activityIndicator stop animation needs to have a dispatch_async
call to it when being stopped inside of a background thread, otherwise
it may not stop exactly when called. This feature has been implemented.
Also added additional tracing for the database INSERTS and SELECTS to
make sure the whol process is executing.