IDEA-104500 Gradle: Allow to reuse common logic for other external systems

1. 'external-system' is split into 'external-system-api' and 'external-system-impl';
2. Legacy code is removed;