Make the entity data optional.

Refs #2267
Fix EntityContext operations on collections.

There were a few cases where EntityContext would hit a fatal error when
dealing with collections/arrays. This fixes that and also introduces
a minor optimization for array properties.
Merge pull request #2821 from cakephp/3.0-collection-context

Fix EntityContext operations on collections.
Merge branch '3.0' into router-prefix-to-route-key