More interface changes related to fixing transpose

Rather than pass indexes into the functor methods, pass offsets directly.
These in turn pass directly to the ptr() methods.  The view methods in varheap
are also changed to deal with references; this way the transpose code can
change the dimensions to reflect the transposition.