Revert line from #4585 to get mask, data shapes to match in .flat

@charris -- this reverts the shape assignment and adds a test for the problematic matrix masked array example that you gave in #4585. Now, as expected:
```
n [1]: import numpy as np; from numpy.ma import MaskedArray

In [2]: a = MaskedArray(np.matrix(np.eye(3)), mask=0)

In [3]: a
Out[3]: 
masked_matrix(data =
 [[1.0 0.0 0.0]
 [0.0 1.0 0.0]
 [0.0 0.0 1.0]],
              mask =
 [[False False False]
 [False False False]
 [False False False]],
        fill_value = 1e+20)


In [4]: a.flat[:2]
Out[4]: 
masked_matrix(data =
 [[1.0 0.0]],
              mask =
 [[False False]],
        fill_value = 1e+20)
```