As she prepares to announce the end of her presidential bid, Joe Klein looks back at what went wrongand right