[Truffle] Restore part of the constant caching.

* No need to define READ_CONSTANT for doUnboxedObject,
  constant lookup is only allowed on modules.
[Truffle] Restore the rest of the constant cache.

* Still does not take lexical parents into account.
* Relies on identifying modules by their singleton class.
[Truffle] Add RubyModule.isOnlyAModule() to check if a Module but not a Class.

* Makes the intent clearer.
[Truffle] use getSingletonClass() to ensure getting the singleton class.

* So the receiver of constant lookup, a Module, is an instance of its singleton class
  for cache and invalidation compatibility with calls.
[Truffle] Proper invalidation for lexical scope.

* dependents can now be cyclic, such as below.

class Parent
end
class Child < Parent
end
p Child.ancestors # => [Child, Parent, ...]

class Child
  class ::Parent
    p Module.nesting # => [Parent, Child]
  end
end
[Truffle] We also need to invalidate the singleton class for changes to constant lookup.

* Only if there is a singleton class, of course.