Noah Lyles won in the closest Olympic 100m finish in modern history as just five thousandths of a second separated him from Jamaica's Kishane Thompson.