added a simple span<T> class to help manage memory views
Medium-term milestone: revise the C++ API to be closer to the STL container API
for Grids. Spans help because, semantically, constructing an object from a span
is a view construction operation. This makes wrappping Grids onto 1d spans
easier to understand in code.