Fix rebuilding programs after context loss

Uniform state needs to be reinitialized after context loss occurs.

Fixes a regression introduced by commit "Cache shader program uniform
state to avoid redundant uniform1i calls".