Backport fix for np.concatenate with axis=None

I created a branch off of maintenance/1.7.x and cherry picked two commits from master:

027c3d91b6b5bbc0f7e50cce8a39da439e165d39
7c183a5d03ae31a6369cdcc608b4e4fabf83484f

and resolved the conflicts in the unittest.  I verified the tests run.

See issue https://github.com/numpy/numpy/issues/3274