Elaine Thompson-Herah became the second-fastest woman in history as she beat fellow Jamaican Shelly-Ann Fraser-Pryce to retain her Olympic 100m title.