[runtime] Fix the build.
[runtime] Add a remoting.h file and move the remoting related marshal function declarations there. Add a low level lock used by the remoting.c file and an initialization function.