Jamaica's Elaine Thompson-Herah set a new Olympic record in the women's 100m as she finished ahead of compatriot Shelly-Ann Fraser-Pryce.