A concurrent implementation using ConcurrentHashSet.
The max size (K) may be temporarily exceeded due to concurrency,
a pending split, or the behavior of the supplied trimmer,
as explained below.
The creator is responsible for splits.
This class has no knowledge of the DHT base used for XORing,
and thus there are no validity checks in add/remove.
The begin and end values are immutable.
All entries in this bucket will have at least one bit different
from us in the range [begin, end] inclusive.
Splits must be implemented by creating two new buckets
and discarding this one.
The keys are kept in a Set and are NOT sorted by last-seen.
Per-key last-seen-time, failures, etc. must be tracked elsewhere.
If this bucket is full (i.e. begin == end && size == max)
then add() will call KBucketTrimmer.trim() do
(possibly) remove older entries, and indicate whether
to add the new entry. If the trimmer returns true without
removing entries, this KBucket will exceed the max size.
Refactored from net.i2p.router.networkdb.kademlia
Highest high bit for the difference keys.
The upper-bounds distance of this bucket is (2**(end+1)) - 1.
If begin == end, the bucket cannot be split further.
If end == (numbits - 1), this is the furthest bucket.