Locks tidy up

Miscellaneous tidy up / simplification of swlock_try_acquire, see commit messages for more details.