BF: ensure ravel_multi_index has good working type

Indices could overflow if input type of index array was not large
enough to hold large indices.