President Donald Trump said he was surprised how badly Brexit has been handled and warned that another referendum would be "unfair".