Invoke an Action delegate or event in a thread-safe manner.