Prepare for KT-5420 - Copy files before patch
Memory leak in PermGen of Kotlin Gradle plugin when demon is used (KT-5420)

Stop background thread in Intellij Idea api and clear thread locals to allow gc the created class loader

 #KT-5420 In Progress