Graph: reimplemented server back end to speed up basic case

The basic case does not split skeletons in any way,
therefore there is no need to retrieve all treenodes of every skeleton.

Additionally, the synapse clustering is applied only when appropriate.
Overall the new approach attempts to minimize operations at the server side
as much as possible.