Collision

Better edge detection this time. More is left to work out. There is
minor clipping on edges at times so that it doesn't try to rectify both
edges on a collide if a corner is hit.