Add proper entity groups and indices.

Groups and indices are necessary for storing entity filters in a bitfield.
Show / hide entity definition types.
Entity link rendering.