Cleanup subscript rebased

This is an attempt to merge gh-436. It is not too pretty I admit. I did try to check why code was not automatically removed...
The commits in between do not leave numpy in a working state (some fixups are not quite with the correct commit and I missed some smaller things during rebase). The 28e6ec5 is not included (as mentioned in that PR).

Anyway, tests run through. @charris I think you had a go at it before, so maybe you remember something...