Move StubGen to JCommander for options
Add tests for StubGen, fix bugs revealed by tests
Do not generate redundant modifiers