Sam Cosgrove: Departing Don thanks Aberdeen manager for transforming his career