Made createToObject atomic, factoring IO from global state access.
Functions like createToObject (and other NutleyObject returing functions) can return a NutleyActionObject,
which is contains an ErrorT IO NutleyObject.
The idea is that these computations atomically look at the program state and then return something with disk-io, rather than doing the disk IO during the atomic phase.
Queries are now believed to be totally ACID, although memory leeks might be possible.
This is nessesary to enable anonymous databases.