Thoma Bravo hands Medallia to lenders in one of PE’s biggest losses