Analysts warn that the Brexit vote and U.S. presidential election have many of the same parallels and pitfalls.