Fixed generation of C# vtable interop code. Update the vtable generation index in each iteration.
Formatting changes.
Fixed a tricky bug that was breaking generation of vtables interop code.

The generation problem manifested as duplication of methods in the AST which was breaking the numbering logic and caused duplicated delegates.

The root problem was that in the parser we sometimes would walk through methods but forget to add them to their respective classes.

No test because it's tricky to trigger it.