Geometric modular action for disjoint intervals and boundary conformal field theory