Fix node type being sent to prebuild_node in galaxy.workflow_editor.js.
Eliminate code dup. in workflow editor for building connectors.
Eliminate code dup. in workflow editor for building input terminals.
Refactor out optional data selection handling.
Reused a few times downstream for dataset collections.