don't copy data when changing shape

When changing the shape of an array, by writing, say,
  >>> a.shape = 10,
an AttributeError is raised if the new shape is incompatible
with the old one. This is the intended behaviour and no
problem.

Under the hood, however, what's happening is that
in this case the array is copied as it would be
if one had written
  >>> a = a.reshape((10,))
and once it is realized that this doesn't work, the
result is discarded again, and the said AttributeError
is raised.

I discovered that while working with humongous
matrices, which nearly fill my memory. I used
the a.shape=something method because it
was supposed to be a memory no-op. Unfortunately
it isn't, as numpy tried and failed to copy the array
and raised a MemoryError instead of an AttributeError.

I consider this all a bug, not a feature, so I fixed it.
With this pull request, no data is ever copied when
changing the shape of an array.