Deal restores severance pay for military gays