foundry: Implement process and endpoint monitoring
To ensure proper operation of the build system, the management script
must make sure that the individual processes of foundry are running,
and that the IPC endpoints that are used for messaging are existing.
This commit adds a process watchdog to foundry.sh which ensures that
all processes are running as configured.
Further, this commit adds code to ensure that IPC endpoints are
existing, and periodically logs the contents of the IPC endpoints'
queues to a file so the messages sent between components of the
buildsystem can be monitored by an administrator.