UBS posts doubling of third-quarter profit in Ermotti’s swan song