Leveraging Router Programmability for Traffic Matrix Computation