Changes globalobj<GlobalVariable> to be a reference-like object so that expressions like x[0] = rhs can work for global variable x.  Unifies the implementation of operator[] with ref.  This is needed for coding jump tables, which are static tables of block addresses.  To index into the table inside a function, we need reference-like semantics, and it makes more sense to turn globalobj<GlobalVariable> into something derived from reference, rather than reimplement everything from ref.