Update CGAME unlockables data each client frame if necessary.

The former approach to update on team change and new input mask only resulted
in uninitialized data on CG_Init (e.g. vid_restart). d808aa9 fixed that issue
but lead to out-of-sync handling of masks, producing in bad (un)lock
notifications.
Fix bad cast inside G_UpdateUnlockables.