Implemented atomic object updates

Events are now batched in an array, which is processed on the target
object atomically. Attribute changes on an object no longer send events
immediately, instead the changes are held in a dictionary and then
transmitted as an array when KVObject.publish() is called. This allows
for more control over attribute updates, but does mean that old
automaton scripts which don't call publish() will need to be updated.