Fix exists() being called on every save() operation.

If an entity isNew and contains no primary key data we should not call exists() as there is no way for it to exist yet. Exists should continue to be called when the entity has a primary key value and is marked as new though as it may or may not exist in the database and we need to know.

Fixes #4260
I used `array_filter($primary, 'strlen')` in the corresponding place for the update code. This allows people to use 0 as a primary key. Also, I think it should check if the count of fields after the filter matches the count of fields in the PK.