Improve subscriber tracking
Create a dedicated immutable Subscribers object, which tracks handlers
and their corresponding formatters.
Subscribers are structured, so multiple subscribers with the same
formatter with reuse the same formatted message.
Each RestconfStream starts with Subscribers.empty(), indicating a first
subscriber is required. When we lose the last subscriber, Subscribers
will become null and we trigger stream removal.
This improves on the HashSet tracking in terms of memory footprint, as
we typically will have 0 or 1 subscribers.
The newly introduced indirection through Subscriber allows the
subscriber to dictate the actual formatter which we will use in upcoming
patches.
JIRA: NETCONF-1102
Change-Id: I75e581ed7615b883e65ea60285cd4c1ba09d109e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>