Refactor _std_mapper and add _num_tiles helper.

_std_mapper still broken for uneven arrays but works correctly for
square arrays.

Add _num_tiles helper function that returns the number of tiles for
necessary for a DistArray, given its shape and the shape of its tiles.