Bloch-Messiah reduction of Gaussian unitaries by Takagi factorization