Trie#put, Trie#bulk_put: return self if value is not changed

Modify Trie#put and Trie#bulk_put so they don't create a new Trie
instance if the value being stored is identical (same Ruby object_id) to
the value that already appears in the receiver.

This allows the nice behaviour in which Hash#merge and Set#union simply
return self when merging with a subset Hash/Set (and of course same for
Hash#put and Hash#store).