Theresa May insists Islamic State is on the retreat as she assured Gulf leaders that a post-Brexit Britain would not abandon the Middle East.