added $model->exists($id) method on MapperModel
(cherry picked from commit 053c4c719a80863d99c7bf2170874cf12e21eb74)
ProjectModel test fixes for Realm.
Fix JsonEncoder re encoding of reference list.
wip: session variables for rights.