President Obama’s farewell address encouraged Democrats and Republicans to learn from each other, and offered optimism to all