IDEA-107420 Gradle: Correct tasks representation

1. Local external system settings are processed now (tool window tree 'expanded' state is correctly stored and restored now; last projects/tasks are cached as well);
2. Minor refactorings;