Make bounding box a dictionary, get obstacles with list comprehension

I should have put these two changes into separate commits, but I ended
up not being able to keep them apart because I didn't change the
implementation using the list to work with the dictionary, only in order
to change that implementation again to use list comprehension.

This makes the code a bit simpler.
Merge branch 'bbox_dict'