Fixes for instrumented debug build
This MR has some fixes for an instrumented debug build - generally the instrumentation was only being applied to a subset of the project as it was manually added to just one target. This MR adds it more generally - although there are still some manual bits until we merge the hsm service and older code.
Include fixes now that it has been turned on.