added modelInstances cache to modelUtils.

This fixes the problem of each view getting a new version of the same model.
This way models can trigger events and have different views listen to those events.

It gets cleared on every new action and isn't run on the server.
This way they can be garbage collected along with the associated events and views.