British police said they had detained a man who had doused himself in what appeared to be gasoline outside parliament in London on Tuesday.