Bath theatre to be passed to not-for-profit after challenge