Phase-change memory device with overvoltage protection and method for protecting a phase-change memory device against overvoltages