issue-579: ensure order between memory region and libunwind locks

I.e. to prevent possible deadlock when this locks are taked by
different threads in different order.

This particular problem was also reported as part of issue 66.