Add status handling to couch sync service

This adds a status to the couch sync service. Status can be "sync", "online", "offline". The status can be observed using sync.onStatusChange().

The idea is to reduce the number of pouchdb event handler registrations throughout the application. This can also be used by controllers to know when they can fetch data using the views. Maybe a sync.ready() method should be used (which is called when status moves to "online").
According to pouchdb docu: "The 'uptodate' event fires during live replication, when the target database is up-to-date and just idling, waiting for new changes." 
For me that should mean that after new changes are received an 'uptodate' event should be fired (because the database is again up-to-date) but I noticed that it doesn't happen like that, for example in sl-calls I am using the 'uptodate' event to display the time the local database was last updated, but while I keep receiving live changes from the database, this timestamp doesn't get updated anymore after the first replication is finished.

 I think in fact 'uptodate' is an equivalent to 'complete' but for live replication, so in this case the status will be most of the time set to 'sync' and not 'online'.