Added the Component mixin and added more tests

The Component mixin adds typeNum statically to any struct / class
that is going to act as a component.

World got a new unittest that tests the proper handling of an
improperly setup world or an improper query.