Collision tests

- Added collision detection in js/collision.js
- Moved tests into 'test' directory