Move stored value creation into StoredValues

Methods that compute and store certain values when needed now occur
during StoredValues.<Type>.get() for those stored values. If the
interpreter does not have a value, it will create one using
createValue() and then store it in the interpreter's hash map. By
default, createValue() returns null (which throws an exception in get()).
To use it, override it with code that computes the desired value for a
certain type. StoredValue also now uses Java Object instead of
JavaObjectTerm for its key. Some existing predicates have also been
refactored to not create values on their own.

Change-Id: Ia3d44169f86526c0c16f9580f3d52d04b0b83b2b
6 files changed