Introduce the ReferenceCache concept

This is a simple CPU/memory tradeoff primitive, which allows for sharing
of object references in the cardinality/frequency of a particular object
type is favorable. AsNumber is typical candidate.

Change-Id: I79ab163f5da32ad5f99ba99246ae96005ac03df5
Signed-off-by: Robert Varga <rovarga@cisco.com>