Fix afterFind() called twice with hasMany relationship

It occurs when a model and the children models are related to a same model.
For example, such as the following:

* User hasMany Comment
* User hasMany Article
* Article hasMany Comment
Fix different format of $results in afterFind

Refs #2529

As of this commit, we can get consistent format of $resutls in afterFind.
And we can keep backward compatibility if Model::$useConsistentAfterFind is set to false.
Made AuthComponent::mapActions() act as a getter refs #3331
Revert "Merge pull request #4405 from php-engineer/master-session-bugfix"

This reverts commit 5863adda424b3f0f513436176608ea376af1c294, reversing
changes made to 4c37cf6d4b9ed740ed157a8a5089c6b76914def4.

There was no real issue. The lack of session cookie in CLI makes writing
tests a bit tricky which caused the confusion. Refs #4405, #4451.
Update version number to 2.5.4
Update all @deprecated annotations

to adhere to the @deprecated <version> <description> format, where version and description are mandatory.
Add array cast for method_cache data.

Fixes #4186
Merge pull request #4223 from chinpei215/2.6-issue2529-fix

Fix different format of $results in afterFind
console: don't use colored output if there's no TTY

This prevents ANSI escape codes and style tags showing up in
cron-jobs, pipes or redirects.
Merge pull request #4477 from mfn/mfn-console-output-isatty

console: don't use colored output if there's no TTY
Add abstract methods for required driver features.

These methods are expected by Connection, and should be part of the
abstract interface.
Add stub methods for enabling/disabling foreign keys
Add SQL commands to disable constraints to MySQL and SQLite.

Postgres and SQLserver don't seem quite so simple.
Make postgres foreign keys deferrable.

Having deferable keys will be important for fixtures. If a constraint
is not deferable, it cannot be turned off temporarily. Since the current
schema tools are generally for creating fixture schema we'll assume
people want that feature as it is pretty handy.
Add disable/enable constraints for postgres.

Now that fixture constraints can be deferred, we can use the simple
version of disabling constraints.
Add disable/enable constraints for SQLServer.

I have no verified this, but it looks like it will work.
Merge pull request #4463 from ravage84/deprecated-annotaions

Update all @deprecated annotations
Deprecated AuthComponent::mapActions
Merge pull request #4417 from jeremyharris/3331

Fix for #3331
Remove dead code and reduce # of times tables are listed.

There is no reason to get the table list for each and every fixture
creation. The important part - the original tables - is unlikely.

This should help improve performance on apps with many tables, as you
shave N queries per test method which can all add up.