Higher logarithmic topological quantum field theories and the residue torsion of manifolds