FieldsNotPublishedVisitor.detectAReturnBug() adapted to consider
publication of immutable fields harmless.
HeapObject.getClosure() made public.
Before this commit, the method visitReturnInstruction() was overriden in
FieldsNotPublished, so as to call a detectBug hook method. This
implementation of visitReturnInstruction() has now been moved into
BaseVisitor, with the consequence that all other specific visitors have
to provide an empty implementation of the hook method.