AIDEGen: Refactor ProjectConfig to a singleton class.

Refactor ProjectConfig to a singleton class. The pros are:
1. ProjectConfig becomes a singleton and every module can easily refer to it and we can reduce
   lots of arguments passing.
2. aidegen_main() function is clear. The whole flow is:
    a) ProjectConfig(args).init_environment()
    b) ProjectInfo.generate_projects()
    c) multi_projects_locate_source()
    d) _generate_project_files(projects)
    e) _launch_ide()

Bug: 135888022
Test: 1. aidegen tradefed -n
         rename core.iml to _core.iml, dependencies.iml to
         _dependencies.iml
      2. m aidegen;aidegen-dev tradefed -n
         contents of core.iml should be the same as that of _core.iml
         and that of dependencies.iml is the same as _dependencies.iml
         as well.
         If you have installed kdiff3 you can try
         kdiff3 tools/tradefederation/core/_core.iml tools/tradefederation/core/core.iml
         The two files' contants are the same.
         kdiff3 tools/tradefederation/core/_dependencies.iml tools/tradefederation/core/dependencies.iml
         The two files' contants are the same.
      3. cd tools/tradefederation/core;aidegen-dev -a
         IntelliJ will be launched with android whole source tree.

Change-Id: I28de6f73fd0415a8608c6a30f5794686070b6762
14 files changed