BUG: Allos linalg.solve to handle zero equations.

This was previously correct, but the special case was missing
since the gufunc code cannot handle it.
Merge pull request #3848 from seberg/solve_0k

BUG: Allos linalg.solve to handle zero equations.
Merge pull request #3851 from juliantaylor/median-subclass

BUG: preserve ndarray subclasses in median
MAINT: accept NULL in NpyIter_Deallocate and remove redundant NULL checks

Deallocation should just do nothing if provided a NULL pointer nditer
deletion broke this convention.
Removed many redundant NULL checks for various deallocation functions
used in numpy, they all end up in standard C free or PyMem_Free which
are both NULL safe.