The Puerto Rico Electric Power Authority and its creditors were close to a deal that would allow the cash-strapped utility to pay more than $400 million to bondholders, staving off what investors feared might be the first default of many from the U.S. commonwealth.