Added libprocess finalization.

Introduced a finalize() function to match the initialize() function in
process.hpp. Use this at the unit test runner for libprocess to start
getting more valuable valgrind feedback.
Added cleanup of remaining Processes in ~ProcessManager() as a start.

Review: https://reviews.apache.org/r/26533