Use a WeakKeyDictionary to track coroutine objects to prevent leaks. Fixes #330.