BUG: Fix numpy.ma.median for various things.
BUG: Fix numpy.ma.median for various things.

This fixes four bugs:

- Use of booleans for indexing in ma.extras._median
- Error when mask is nomask and ndim != 1 in ma.extras._median
- Did not work for 0-d arrays.
- No out argument for {0,1}-d arrays.

Closes #8015.

AustereCuriosity/numpy,utke1/numpy,madphysicist/numpy,mattip/numpy,seberg/numpy,ahaldane/numpy,mhvk/numpy,pdebuyl/numpy,Eric89GXL/numpy,bertrand-l/numpy,stuarteberg/numpy,ddasilva/numpy,WarrenWeckesser/numpy,chatcannon/numpy,ahaldane/numpy,stuarteberg/numpy,chatcannon/numpy,jakirkham/numpy,jakirkham/numpy,maniteja123/numpy,Eric89GXL/numpy,b-carter/numpy,mhvk/numpy,abalkin/numpy,rgommers/numpy,anntzer/numpy,shoyer/numpy,chatcannon/numpy,ahaldane/numpy,njase/numpy,madphysicist/numpy,WarrenWeckesser/numpy,anntzer/numpy,jorisvandenbossche/numpy,numpy/numpy,shoyer/numpy,skwbc/numpy,grlee77/numpy,endolith/numpy,jakirkham/numpy,skwbc/numpy,charris/numpy,numpy/numpy,simongibbons/numpy,dwillmer/numpy,pbrod/numpy,WarrenWeckesser/numpy,behzadnouri/numpy,ahaldane/numpy,jakirkham/numpy,gfyoung/numpy,tynn/numpy,mhvk/numpy,AustereCuriosity/numpy,MSeifert04/numpy,gmcastil/numpy,pizzathief/numpy,pbrod/numpy,pizzathief/numpy,grlee77/numpy,numpy/numpy,numpy/numpy,behzadnouri/numpy,dwillmer/numpy,mattip/numpy,charris/numpy,seberg/numpy,charris/numpy,seberg/numpy,madphysicist/numpy,shoyer/numpy,ahaldane/numpy,abalkin/numpy,rgommers/numpy,endolith/numpy,solarjoe/numpy,MSeifert04/numpy,jakirkham/numpy,ContinuumIO/numpy,grlee77/numpy,b-carter/numpy,stuarteberg/numpy,utke1/numpy,jorisvandenbossche/numpy,madphysicist/numpy,tacaswell/numpy,mattip/numpy,pbrod/numpy,mhvk/numpy,Eric89GXL/numpy,simongibbons/numpy,anntzer/numpy,pdebuyl/numpy,utke1/numpy,solarjoe/numpy,maniteja123/numpy,gfyoung/numpy,pdebuyl/numpy,MSeifert04/numpy,bertrand-l/numpy,grlee77/numpy,tacaswell/numpy,tynn/numpy,ContinuumIO/numpy,MSeifert04/numpy,pizzathief/numpy,stuarteberg/numpy,ssanderson/numpy,gfyoung/numpy,jorisvandenbossche/numpy,b-carter/numpy,ssanderson/numpy,maniteja123/numpy,ddasilva/numpy,ContinuumIO/numpy,jorisvandenbossche/numpy,rgommers/numpy,charris/numpy,bertrand-l/numpy,shoyer/numpy,madphysicist/numpy,WarrenWeckesser/numpy,abalkin/numpy,tacaswell/numpy,bringingheavendown/numpy,skwbc/numpy,shoyer/numpy,AustereCuriosity/numpy,bringingheavendown/numpy,gmcastil/numpy,simongibbons/numpy,ssanderson/numpy,endolith/numpy,rgommers/numpy,MSeifert04/numpy,dwillmer/numpy,pdebuyl/numpy,anntzer/numpy,behzadnouri/numpy,Eric89GXL/numpy,grlee77/numpy,bringingheavendown/numpy,seberg/numpy,mhvk/numpy,tynn/numpy,gmcastil/numpy,njase/numpy,simongibbons/numpy,pbrod/numpy,dwillmer/numpy,ddasilva/numpy,jorisvandenbossche/numpy,pizzathief/numpy,mattip/numpy,pbrod/numpy,pizzathief/numpy,simongibbons/numpy,solarjoe/numpy,njase/numpy,WarrenWeckesser/numpy,endolith/numpy