Sorting intersecting targets based on distance.

This commit fixed/enhances jsPlumb drop behaviour: https://github.com/sporritt/jsPlumb/issues/261
The new connection gets created to the nearest endpoint to the drop position.
Merge branch '0.4' of github.com:tikri/katavorio into tikri-0.4

Conflicts:
	src/katavorio-0.4.js
Merge branch 'tikri-0.4' into 0.4