Added locks to each module to ensure only a single thread of execution for a given module at a time. A kind of GSL.
Added cross-module RPC. TODO: multimodule test function. TODO: local functions.