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
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.
Camel case SecurityComponent::blackHole() method call
CS fix.
Removing legacy code that will not work on current versions of phpunit,
fixes #3955
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
fix cs
Move disabling of bootstrap mode to after init().

init() loads from the cache which can autoload additional classes. For
example the FileEngine adapter loads Inflector. Loading additional
classes causes the file_map cache to be re-written on each request when
using FileEngine. This results in degraded performance when using
FileEngine.

Fixes #3947
Fix error when clearing FileCache.

I made a mistake in a previous commit that did not account for dir()
returning directory names.
Unlink files with full path.