first half of room connection algorithm

moved bsp_layout to a pimpl design
added a (mathematical) range class
moved split_x/y for rects to math.hpp