Added obstacle edges detection when moving a sprite.

This permitted sprites to avoid corners when walking/running
and makes the game a bit smoother for the player.

This one went through a lot of testing to avoid breaking the current
game mechanisms.

Closes #208