Final tweak to solve query tests issue.
Fix for #1903: metadata check was wrong, outer loop should be model dependencies.

Conflicts:
	kalite/securesync/devices/models.py
Merge branch 'develop' of github.com:learningequality/ka-lite into ka-lite-central-merge-develop

Conflicts:
	kalite/distributed/tests/browser_tests/query_tests.py