Prime Minister Theresa May says she will form a new British government with backing from Northern Irish unionists after losing her Conservative majority in a snap general election.