Before this change, when making a remote call with "include" filter
(for example `findById(11, {include:['children']})`), the related
models were removed from the result.
This commit fixes the implementation to correctly preserve related
models and also to cast them to correct model instances.
Refactor tests to stop sharing global models between different test
suites and use local per-app model registry instead.
Also clean up all test code to use `const` and `let` instead of `var`.