Add Query::firstOrFail()

This method lets you use get() like behavior on any finder. This is
intended to replace #5157.
Simplify error message and test.
Move RecordNotFoundException to Datasource.

Also move findOrFail() into QueryTrait so it can be used in other
queryable implementations.
Fix PHPCS errors.
Raise an exception on invalid belongs to many data.

If an association uses an incorrect find type (like list), the results
cannot be joined together so we should raise an exception.

Refs #5282
Merge pull request #5315 from cakephp/issue-5282

Raise an exception on invalid belongs to many data.
Merge pull request #5305 from cakephp/orm-findorfail

Add Query::firstOrFail()
Fix CS
Merge remote-tracking branch 'upstream/2.0' into 3.0-connection-prefix