update random generation of 2D intervals

    prevent horizontal and vertical overlap (they can still kiss)
    move old_y = y affect to the condition, the result is unchanged
    add comments