Implement and add quad tree

Quadtrees can be used to speed up Curve.hasPoint(). See http://jsxgraph.uni-bayreuth.de/~michael/jsxgui/Examples/internal/qdt.html for an example.