FIX: NumPy non-integer indexing deprecation warnings

Replaces #628

This includes all fixes from the previous PR, but a few new issues snuck in over the last 10 months. I'm lifting them from the Python3 Travis logs and fixing them, so this is still a WIP.

Once my PR against @stefanv's branch is merged in #992, that PR will include a safe conversion check for float -> int, which is needed to sort the remaining few known warnings. They cannot be addressed by truncating division. I can fix them in this PR if #992 is merged first, otherwise I'll have to submit those separately.