add debug and message events
update remotestorage.js to feature/622-commit_cache branch