Add missed overrides for OpenJDK 8 Map default methods

Both the replace methods in TreeMap were left intentionally in the
commit 0e83756c4295f4df3853047205d94fe845573522 as there were no
behavioral differences and the default implementation was considered
sufficient. However, the upstream version is more efficient so that is
being added here.

As of now, all the overrides for the Map default implementation have
been put from the upstream, except for Hashtable and HashMap. Both
of these classes are quite different from their OpenJDK 8 versions to
accommodate the overrides. HashMap depends on the default implementation
for the following methods:

 #getOrDefault
 #replace(K, V)
 #computeIfAbsent
 #computeIfPresent
 #compute
 #merge

 #replace(K, V, V) was reimplemented due to the behavioral differences
  with the default implementation.

The following Hashtable methods are also dependent on the map default
implementation, though, they have added synchronization.

 #getOrDefault
 #putIfAbsent
 #remove
 #replace(K, V, V)
 #replace(K, V)
 #computeIfAbsent
 #computeIfPresent
 #compute

Once the classes get ready with the new changes comes with OpenJDK 8,
the above methods would be put in.

Bug: 27426743
Change-Id: Iee4fb156eddee17187386bbfffc8517415030a94
(cherry picked from commit f0d9b8aea94c2a207b7b71faaa7a8a2f78ddf1ea)
6 files changed