The US Senate has voted for legislation that would bar Donald Trump from taking further military action against Venezuela without authorisation from Congress.