Refactor tone analysis into library

Squashed commit of the following:

commit 20b7e3a07d36c3a7df68e2243fc3738402903f1b
Author: David Hinkle <dhinkle@qccolab.com>
Date:   Tue Apr 15 01:11:37 2014 -0400

    Fixed bugs

commit 1f4e0537fb7abd8c1983c1f014ab403207bc741d
Author: David Hinkle <dhinkle@qccolab.com>
Date:   Sat Apr 12 19:04:03 2014 -0400

    Library refactor in progress