Andy Burnham was mayor of Greater Manchester for nine years. His time there came to define his identity — and his pitch to become prime minister.