Switch to Entity classes

Using a primitive as entity in Java is a fool's errand, since every lookup
the entity is used for (its primary purpose) requires (auto)boxing to
object. We also never calculate with entity ids.

int seems rather limiting if you think about it, especially when you would
want to encode information in the entity id, like the machine it's coming
from or whatever.

So we're using our own type-safe Entity class with long payload and
equals/hashcode impl.
Introduce single components

A single component is a component that can only be assigned to one entity
per system. If the component is assigned to another one, the old entity
automatically loses the component.

The handling of these singletons is faster than for normal components as
the implementation can take advantage of the singleton nature of the component,
at minimal cost of type checks here and there.

Clean up some code.