Add appstate sync api

This implementation is based on the app2app api, it is only client-side running
in the browser or wrt.

In order for the api to recognize when there are properties to sync it needs to
know about those properties. Either a template object with existing
properties is used when creating the sync object or for a new prop added later
to a sync obj it is needed to call watch on for them first, so they can be
synced.

Also needs https://github.com/webinos/Webinos-Platform/pull/440.

Jira-issue: http://jira.webinos.org/browse/WP-235