Fix the HashMap performance regression.

Go back to the original cheap (and inline) secondary hash.
LinkedHashMap is a subclass of HashMap, so that has to change too.

Bug: 8290590
Change-Id: I7959a8ce8b8fc96e7f1d2c8a2a13fe83ef4c0dd5