Add yangtools.concepts.CheckedValue
There are quite a few places where we would like to conditionally
create a value or report an error. These currently rely on thrown
exceptions, which has a performance penalty.
Introduce CheckedValue, which acts as a combined holder object
for either a value or an Exception. These objects can act as
intermediaries between callers and callees.
The underlying concept here is that of a variant value, which contains
either a value of type A or a value of type B. This patch adds
the concept as a utility Variant<T, U>.
Change-Id: Ibc6f562e22805b38402436cd9c0368dfcbb775fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>