Fix IDEA-218032: call SetDllDirectory before loading JVM, and reset it afterwards
Fix IDEA-218032: call SetDllDirectory before loading JVM, and reset it afterwards

This will allow us to load any non-JBR JVM versions that depends on any
runtime libraries in the parent directory (which is a usual placement
for JVM distributions in the wild).

For JBR, we won't need that because the runtime libraries will be
redistributed within launcher directory (and will be picked
automatically).

cherry-picked from 7552948b64585f3570e6bc04c65460ddac6871db

GitOrigin-RevId: a7ab5b92bc84c650bf7ded8e9c1964a9b81da1f0
allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community,allotria/intellij-community