A federal appeals court revived a lawsuit accusing the U.S. Department of Housing and Urban Development of setting up its reverse-mortgage program in a way that makes it more likely a surviving spouse will end up in foreclosure.