core: simplify mutex signatures

Fixes #1436
If you're at it to change the function prototypes: use `mutex_t` instead of `struct mutex_t`