On the evaluation of the specific heat and general off-diagonal n-point correlation functions within the loop algorithm