Use UnsignedLongSet instead of RangeSet in metadata
Split UnsignedLongSet into two implementations, mutable and immutable.
Use the mutable implementation in runtime tracking of identifiers and
use the immutable implementation for tracking identifiers in metadata.
The serialization format is kept compatible with RangeSets, although
that implies a minor penalty in serdes.
This switch ends up potentially using more objects for small sets, but
that is offset by not having Cut indirections and most notably being
resistent to allocation of huge arrays.
JIRA: CONTROLLER-2011
Change-Id: I0c84ffaaa4ce39299cef9006784b8aff78dd0f83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e9efe27538adb5ae575f77fda90f147d46341801)
(cherry picked from commit
4da04f2f6e68f8dc07860c9e440bef26d69f36a4)