Update xal.js to follow latest API

xal.createEvent(xiKey, cb(state, done))
state.get(xiKey)
state.put(xiKey, value | object)