Deal loosens US control of train link at a time when Trump is seeking to ‘take back’ trade waterway