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
Docblock and return type fixes
Don't need to check for empty because Model::validator() returns an interator
Add for required fields when using only ModelValidator::add()
Fix whitespace
Merge pull request #1461 from thegallagher/master

Required fields not recognised by FormHelper when only using ModelValidator::add()
Make sure ComponentCollection has the controller dependency.

Add setter method as changing ComponentCollection's constructor now is
not possible. This fixes issues where components that rely on
Collection->getController() in their constructor can work properly.

Fixes #3946
Fix double printing of models in ConsoleShell.

Fixes #3952
Fix errors in ConsoleShell.

The switch statement was failing to evaluate conditions properly and
always attempted to run the bind command.
Merge pull request #1440 from Phally/master-postgres-fails

Adds order to the test models to make the results more predictable.
Camel case SecurityComponent::blackHole() method call
Merge pull request #1469 from sime/blackHole-camelcase

Camel case SecurityComponent::blackHole() method call
CS fix.
Removing legacy code that will not work on current versions of phpunit,
fixes #3955
Merge pull request #1470 from uzyn/csfix

CS fix.
Make CakeRoute::persistParams() more tolerant

Subclasses and instances may not always define persist options.
CakeRoute should be accepting of these differences.

Fixes #3957
Remove duplicate code.

The conditions for persistParams() work should be self contained. Remove
this duplication.
Fixed bug when using multi model fieldList and whitelists for all models are not provided.
Fixes #3948
Fix clearing files in multiple groups.

When using multiple groups on a cache config, clearing was not working
properly. Clearing un-used cache configs also failed when the
directories did not exist.

Fixes #3930