Fix migrations related to wrong resolution of history entry model.
Fix HistoryResourceMixin class import.
Improved monkey patching setup.

And remove unused monkey patching functions.
Remove unused import.
Set RolePoints.points relation nullable.
Setup django on start testrunner.
Fix tests.