Generalized Locally Toeplitz Sequences: Theory and Applications