The lessons Barack Obama learned from his defeat.