Swift port of https://github.com/wooga/entitas