Collision detection

Added functionality for mathematically checking for an intersection between a moving item and other map items. If an intersection is detected, a collision occurs. The moving item is stopped if the object being collided with is nonpermeable.