ENH: allow 0-by-0 in linalg.inv and linalg.solve

Allows 0-by-0 matrix in linalg.inv and linalg.solve. The inverse of the 0-by-0
matrix is again the 0-by-0 inverse. Closes #3291.
TST: linalg: add tests for 0-by-0 in inv and solve

These tests differ from test_empty since
atleast_2d(array([], dtype = double)) returns an array with shape (1,0).