MAINT: Use low priority thread for insertions
MAINT: Add NSAlert for failed inserts
MAINT: Remove NSLog from tests
BUG: Fix crash caused by locked threads

Stocastically the application would crash and get to a point where more
than 64 threads were being executed. Analyzing the application using
Activity Monitor showed that it was a call to
[[[NSWorkspace sharedWorkspace]  frontMostApplication] bundleIdentifier]
that was locking the threads.

From the documentation it seems like frontMostApplication is not a
thread safe method.

This is an example of the relevant piece of the trace that I got when
the app crashed:

2317 Thread_5993572   DispatchQueue_4: com.apple.root.low-priority  (concurrent)
+ 2317 start_wqthread  (in libsystem_pthread.dylib) + 13  [0x7fff8e9d0fb9]
+   2317 _pthread_wqthread  (in libsystem_pthread.dylib) + 314  [0x7fff8e9cdef8]
+     2317 _dispatch_worker_thread2  (in libdispatch.dylib) + 40  [0x7fff90678177]
+       2317 _dispatch_root_queue_drain  (in libdispatch.dylib) + 326  [0x7fff90677082]
+         2317 _dispatch_client_callout  (in libdispatch.dylib) + 8  [0x7fff9067528d]
+           2317 _dispatch_call_block_and_release  (in libdispatch.dylib) + 12  [0x7fff906781bb]
+             2317 __45-[AppDelegate applicationDidFinishLaunching:]_block_invoke_2  (in Keystats) + 251  [0x10bc7075b]  AppDelegate.m:180
+               2317 -[NSRunningApplication bundleIdentifier]  (in AppKit) + 96  [0x7fff937d8468]
+                 2317 -[NSLock lock]  (in Foundation) + 145  [0x7fff962428bb]
+                   2317 _pthread_mutex_lock  (in libsystem_pthread.dylib) + 372  [0x7fff8e9cf779]
+                     2317 __psynch_mutexwait  (in libsystem_kernel.dylib) + 10  [0x7fff8efc2746]