Change copy to make views of indices.

Requires changing groupby to check whether indices are identical, rather
than comparing with `is`. Plus add tests for name checks through
everything.