Fix queries to build process relationships to:
a. Always go to an index
b. A constant set of queries (3) rather than the number of queries
dependent on the number of processes.

Changed the data structures a little bit, and renamed input_processes
and output_processes to upstream and downstream. Changed the UI to make
this more explicit and updated the popups to show if it is sending or
receiving an object. Showed the type of object being received.

The backend code is now much more scalable because of the small number
of queries and extensive use of dictionaries for lookups.