Abstracted collisionMatrix into own class

With swappable Array/Object-backed implementations.

Hi again.

I have been finding the array based collision matrix has been growing so much that it ends up being very slow. The Object-backed implementation included here performs much faster for me. I have just added it as an optional extra backend and expanded the test cases.

Thanks.