Panama has complained to the United Nations over President Donald Trump's "worrying" threat to seize the Panama Canal.