Makefile tweaks for profiling/debugging

* use static libs
* generate debug info
* link with rdynamic for metric
optimizations to ignore locked_regions

* a NULL mutex means the region can’t be locked
debugging notes
Merge branch 'proj/configurable-region-size' of github.com:dfcarney/ece1747 into proj/configurable-region-size