begin separating into modules.

Moved functions that are common to both methods of IPC into their
own file. The next step will be to move the pipe specific functions
out to their own file.