Patch pthread mutex lock functions to disable lock elision, since it cor...

...rupts rbc counters on Haswell.

Resolves #1054.