Dualities and the phase diagram of the p-clock model