BUG: sparse: minor bugfixes

- Fix a test issue related to https://github.com/numpy/numpy/pull/3777

- Fix some bugs in DOK that were unmasked by that + improve test coverage