Retiring former England captain Alastair Cook admits the sacking of Kevin Pietersen was one of the toughest moments of his career.