BUG: ma.compressed() function returns masked array

When a masked array with nomask was passed to ma.compressed()
function, the result was the original masked array instead of
an ndarray.

Closes gh-4026.