President Barack Obama and his staff define their legacy after eight historic years and one of the most unpredictable elections in modern US history.