JCR-2298: Collect the call stack on connection close only on debug mode

https://jira.exoplatform.org/browse/JCR-2298