Only using 'id' OR 'name' from pb path in datastore.Entity.save.

This was introduced in #289 and discovered while rebasing those
changes into #281.

The datastore backend fails if both 'id' and 'name' are set on
a key, so this only copies the parts of the saved pb key that
are actually set.
Merge pull request #291 from dhermes/fix-key-error-in-entity-save

Only using 'id' OR 'name' from pb path in datastore.Entity.save.
Refactoring duplicate code between storage.key and storage.bucket.