Improve communication to/from worker

This adds a dedicated module for serializing value which cannot be
directly sent to the worker, such as Maps, Sets and Graphs. This can
be adjusted / extended as needed when more methods are added.
Convert betweenness centrality

Also updates async transform to handle patterns correctly.