A petition set up on a British government website calling for President Donald Trump to be barred from visiting the country has attracted hundreds of thousands of signatures, qualifying it for a parliamentary debate.