Added spatial hash for collisions

A bit hacky, but it works.
Fixed new spawnEntity not returning the entity
Merge remote-tracking branch 'upstream/master'

Conflicts: 'states\game.lua'