Add locks only for non-OPENMP multithreading
Add locks only for non-OPENMP multithreading

to migitate performance problems caused by #1052 and #1299 as seen in #1461
xianyi/OpenBLAS,kortschak/OpenBLAS,kortschak/OpenBLAS,xianyi/OpenBLAS,kortschak/OpenBLAS,xianyi/OpenBLAS,kortschak/OpenBLAS,kortschak/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,kortschak/OpenBLAS,kortschak/OpenBLAS,xianyi/OpenBLAS,xianyi/OpenBLAS,kortschak/OpenBLAS,xianyi/OpenBLAS,kortschak/OpenBLAS