Patch pthread mutex lock functions to disable lock elision, since it corrupts rbc counters on Haswell.

Resolves #1054.