Fix an NPE in GenerateJavaScriptAST in superdevmode.

On incremental compiles the pass that assigns runtime type
ids was not recording references arising from the explicit
use of super or X.this.

This cl performs a small refactoring of the runtime type id
assignment logic.

Change-Id: I42972ac5f30fd1befc08b177627f07ca86727e1f