BUG-2377: introduce internal UnmodifiableChildrenMap

This new class acts a replacement of java.util.Collection's version of
the same. Unlike the standard class, this one does not retain cached
versions of keySet and entrySet, since those are unused anyway. We can
also perform an instanceof check, which should speed up operations.
Finally, we check for map emptiness and use Collections.emptyMap()
when possible.

Change-Id: I84c8ac428d6b207fafccf8cc898f0555b104a4ee
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-2384: improve ImmutableUnkeyedListNode efficiency

With moderately-loaded BGP instance we are using quite a few on empty
unkeyed list nodes. The fact they are empty means we waste about 8 bytes
per instance just tracking empty list. Introduce a dedicated class to
take care of this common special case.

Change-Id: I3e94c637f5d7d47d39d274bae96850307f5c439d
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-2390: Lower HashMap allocation defaults

This lowers the default hashmap capacity to 4, hopefully lowering our
overall overhead. It also introduces sizeHint arguments, to the maps can
be better-sized in the future.

Change-Id: Ie6bc9bbf79e7c5c63c3dd0000585660cbc09d368
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-2390: Use child size hints

This patch makes sure we pass down the sizing hints into the
implementation. This will allow us to make better decisions when
resizing maps.

Change-Id: Ic8e48ed108e20381aa0c91a5d8f7e3bb57acf180
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge changes Ic8e48ed1,Ie6bc9bbf,I3e94c637,I84c8ac42

* changes:
  BUG-2390: Use child size hints
  BUG-2390: Lower HashMap allocation defaults
  BUG-2384: improve ImmutableUnkeyedListNode efficiency
  BUG-2377: introduce internal UnmodifiableChildrenMap