Collision detection

Initial version of the collision detection system. It is not tested to be 100% bulletproof, but works flawlessly with the demo and the attached tests. I will improve it further, for now I consider it more important, that @xchrdw can base his movement code on the work already done. I will detail possible improvements in a separate issue.