Geometrical structure and thermal phase transition of the dilute s-state Potts and n-vector model at the percolation threshold