This also adds some mocks to the libcommon test executable, which hopefully will allow it to work with more of libcommon.