When a snapitem is invalidated, its entry in the list of keys is set to -1.
This breaks the binary search, introduced by https://github.com/teeworlds/teeworlds/pull/2129.
Instead of modifying the list itself, I only modify the key value inside the item.
Meanwhile I marked some things in the snapshot code as const.