Add a test case for saving entities with associations.

Saving an entity should validate all the entities that are going to be
saved up front. This makes it easier to build interfaces where all the
errors are shown.

Refs #3600
Fix Table::save() not pre-validating all entities.

This change fixes #3600, and dramatically changes how save() works.
Instead of validating and saving entities in sequence, all entities are
pre-validated. If all validation succeeds then entities will be saved.
This makes the 'validate' option act like validate=first in 2.x. The
'atomic' is almost entirely orthogonal controlling whether or not the
save is run in a transaction or not.

The associated parents do not need to be revalidated so we can disable
validation for them. However, child association do need further
validation as the save process for belongsToMany materializes new
objects that need validation applied.
Merge pull request #4646 from cakephp/issue-3600

Validate all entities before saving