move "mark all read" SQL query as function to libertree-db
Merge branch 'master' into xmpp