cmake: rework unit test execution a bit

so we don't depend on the static test_exec_monitor boost lib, also fixes some rare main undefined errors

NOTE: this is a candidate for the stable branch