ENH Multi-dimensional distance map

This is slower, based on a queue instead of single pass, but will work
in multiple dimensions.
ENH Use a simple queue instead of priority queue

This is faster (292 µs vs 525 µs on a 256x256 test case).
ENH Slightly faster

280µs vs 292µs, but this does slightly less work