Link invariants, the chromatic polynomial and the Potts model