Improve collision detection

In addition to intersection, collision loop checks if a shape contains
another shape.
Minor code merge
copy() reference of direction
Reuse of setDirection in constructor
Merge branch 'Collision' into dev