Fixed the problem of parallel/configure-on-demand combined with scala idea generation.

gradle.projectsEvaluated hook has different semantics in COD mode (it does not support changes to DAG, adding tasks). We should clean this up while unincubating the COD mode. The scala configurer used to add task dependencies in projectsEvaluated hook. Those dependencies were not supported in COD mode and there was an NPE when running the build in parallel. We'll get integ test coverage for this feature automatically when parallel builds imply configuration on demand.