Handle undefined scenarios better
Merge remote-tracking branch 'codeparty/master' into habitrpg
Make access control flags more granular
Start fixing tests broken by recent commits
Fix to test harness to account for stronger document semantics
Fix more broken tests.

- One major fix is check document existence in model against either memory data
  or speculative data.
Fix rest of failing tests.
Add in more undefined query result member checks and debuggine console.warns
Merge remote-tracking branch 'codeparty/master' into habitrpg