Adds order to the test models to make the results more predictable.

Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.

This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
Use ModelValidator::count() to count dynamiclly added validation rules
Update webroot files to fix an issue in ServerShell.

The previous fixes done in 2918ae9c7ab86208be25d5652d94c14685c59faa
caused other issues preventing actions from being dispatched properly.

Fixes #3934
Add failing test for #3930
Break inheritance with ObjectCollection

Make TaskCollection not inherit from ObjectCollection. This removes
methods that TaskCollection never needs and makes TaskCollection work
more like the new style factory/registry classes. More duplication has
been introduced but will be removed in future work.
Clean up doc block for HelperCollection.
Remove dead code.
Extract base class out of subclasses.

* Remove the rampant duplication in the various registry classes.
  Extract a base class out of them.
* Change the name from 'Collection' to 'Registry'. The new subclasses do
  not fire events, and do not contain any iteration methods.
Add upgrade task for renaming collection class uses.
Rename variable/class references to collection classes.

Replace many collection based references with the real class changes.
Rename files to match their classes.
Fix failing test.
Finish moving method and remove static access.
Don't directly call magic methods.
Add missing tests for ComponentRegistry.

A test for loading aliased components was missing.
Use a template method to reduce duplicated code.

Make the various registries use a template method pattern. This reduces
the duplicated code between the various subclasses by keeping the
common parts in the abstract class, and the specializations in the
subclasses.
Improve docs and add reset() method.

Add a reset() method, while I don't think it will be widely useful it
could be helpful in testing situations and is simple to support and
maintain.
Clear bound events when calling reset().

Events will retain instances that should have been destroyed. Clear
bound events when emptying a registry.
Throw exceptions when '' is used as translation domain.

'' is never a good translation domain and often indicates developer
error. Treat it as a mistake and throw an exception.

Fixes #3939
Fix FileEngine not clearing keys when groups are used.

Fixes #3930