Judge rules bankrupt O&G firm can break pipeline contracts