Generalized guarding and partitioning for rectilinear polygons