When creating a new connection use the same query

When a new control connection is made a table is queried multiple times before
the control connection is established. This patch combines the queries to that table
by using "preloaded" results. This seemed like a minimal way to make the change, but
might not necessarily be the best way. Let me know if you feel like a different approach
should be used.