Make TableRegistry methods throw exceptions.

When you attempt to reconfigure an existing object in the registry
either though config() or get() we should throw an exception. Prior to
exceptions the updated configuration would not be applied.

Throwing exceptions will help developers find issues where they might
not be getting the configuration data they think they should be getting.

Refs #2336
Fix failing test in DatabaseSession.
Merge pull request #2561 from cakephp/3.0-registry-exception

3.0 - Make TableRegistry methods throw exceptions.
moving Collection::append() to CollectionTrait, I inteded to add it
there in the first place
Fixed CS errors
Starting to refactor ResultSet to make buffering the default
Implemented result buffering inside ResultSet
Taking buffering config in consideration inside ResultSet
Making result buffering the default
Enabling ResultSet to be rewound
Implemented Collection::first() and renaming one() to first() everywhere
Making ResultSet::first() return the first result if it was buffered, it
makes no sense to return null if we have the value already
Removed ResultCollectionTrait as it had no use after the recent refactor
Using first() in matchFirst
Fixing problems found in code review
A more explicit test case
Merge pull request #2563 from cakephp/3.0-buffered-as-default

3.0 buffered as default
Adding Collection::compile as a way to optimize operations with a single
collection
Add missing param tag.
Add insert/delete/update to ORM\Query

Use the repository object reference to get the table name, removing the
need for additional parameters.