John Guidetti has put an end to uncertainy over his future by signing a new three-year deal at Manchester City.