ipythonblocks: Make BlockGrid._initialize_grid() recursive

This generalizes it to an arbitrary number of dimensions.