A judge ruled that a bankrupt oil-and-gas producer could shed expensive contracts it made with pipeline companies when energy was booming, rejecting pipeline firms’ claim that even bankruptcies couldn’t break the lucrative agreements apart. Sabine Oil & Gas Corp., which filed for bankruptcy protection in July, had asked a New York bankruptcy court to let it out of pipeline agreements with Nordheim Eagle Ford Gathering LLC, an…