Phelps signs off with fairytale farewell