The functional evolution of termite gut microbiota