Fixes an issue with populating inverted index

I forgot to populate the inverted index on games that are created via
the form. This commit fixes that issue, and also adds code to remove the
ids from the inverted index when the game is destroyed