Former Inter, Lazio, Sampdoria and Italy star Antonio Candreva has announced his retirement from football at the age of 38.