Spectral factorization of bi-infinite block Toeplitz matrices with applications