Added keyboard helper and better DB verification.

DB: Fixed up the database functions for Colors to have uniqueness verification.  Colors can
now only be created by assigning them to a palette.  Made the MOC into a Main Thread concurrency
(may want to change this, although I don't see us doing any large database operations that would
 require forking off a thread).
Keyboard Helper: From a stack overflow post linked in the CTKeyboardHandler comments.