Statistics: don't close cursor after node statistics have been fetched

This cursor will be re-used in a future commit.
Statistics: express connector statistics in plain SQL

This make the request a bit more readable and allows for easier modifications.
Statistics: increase connector count only for own completed connectors

So far the connector count in the statistics widget was incremented for
every connector node that was created by a user in a given time frame.
This is changed to an incremented count when connector relations (link
between pre and post) are finishing by a user. This should motivate
finishing synapses early.
Fix wrong connector Z being returned for one_to_many query
Add API to query completed connector links

Completed connector links are a set of a presynaptic connection and a post
synaptic connection, going throug the same connector. The query can be
constrained by the user who completed the link and a trime frame.
Statistics: fix date constraint for last day selected
Support minimum node count for skeleton query
Make completed connector query return same structure as one-to-many

This allows uniform handling of both queries on the client-side.
Statistics: open connector selection table on click of connector count
Add method to User object that returns dummy if ID isn't found
Make one-to-many synapse queries return user IDs rather then logins

The ID to user profile mapping is available client-side.
Merge branch 'connector-list-from-statistics'