* move sm and its dependencies from c-util to c-pal
* fix iwyu
* fix some compile errors
* fix some compile errors
* fix some compile errors
* fix some compile errors
* fix some compile errors
* fix some compile errors
* fix some compile errors
* fix some compile errors
* fix some compile errors
* move sync and interlock into a new lower level c-pal
* fix linux build error
* fix win cmake build error
* changes with comments
* fix linux build error
* merge