* common/Database.cpp: Replace asserts with critical error messages,
so tests can run without a Database connection.
* tests/EntityPropertytest.cpp: Re-write test cases to deal with
modified behavoir if the Entity reference is null.
* tests/EntityPropertytest.cpp: Add a complete set of unit tests for
EntityProperty.
* rulesets/EntityProperty.cpp: Fix and instrument the code based
on the findings from the unit test.