Update client.js

Adds a cleanup function on insert and update
Fixes findOne if no data is cached.
Fixes changedAt event on single records.
Merge branch 'fix-30'