Extend SecurityServices to allow for capturing the security context of the current thread and then setting/unsetting it in a worker thread. This is needed for implementing async events properly