support axis=None for nanmedian ( issue #7352 )

This fixes issue #7352, where ``nanmedian`` does not work when ``axis==None``.
```Python
>>> a=np.array([1+.1111111111111111*1j])
>>> b=np.array([1+.1111111111111112*1j])
>>> tm.assert_almost_equal(a, b, check_less_precise=True)
AssertionError: (1+0.1111111111111111j) != (1+0.1111111111111112j)
```