fix: set teardown after storing the context.
fix: set teardown after storing the context.

Otherwise, we can modify the context after/while the process is shutting down.

fixes #189

libp2p/go-libp2p,ipfs/go-libp2p,libp2p/go-libp2p