Restore context on error.

Handle CONTEXT_LOST_WEBGL error. When browser decides to take GL context away from us we store enough state to reconstruct it when needed.