Great Britain's Keely Hodgkinson dominated the Olympic 800m final to win gold and end her wait for a global title.