Merge pull request #3473 from ntherning/fix-thread-double-close-handle-on-appdomain...