fix race condition in mutex release

setting mutex and held_by is not atomic.
if we get yielded twice in between that can result in failed assertions in the aquire/tryaquire methods

demo code that triggers the race:
https://github.com/plawatsch/sweb/tree/mutex-race-demo