kernel/lockmgr: Add lockmgr_try().
It just adds LK_NOWAIT to the flags and returns whether the
lock was obtained.
It is similar to other functions such as spin_trylock() or
FreeBSD's mtx_trylock() and can be used to port the latter.
Note that like these functions, it returns TRUE if successful,
while lockmgr() returns 0 if successful. This difference was
the source of minor confusion and porting mistakes in the past.
In fact, our driver porting document also didn't point out this
difference. I will fix some of these little issues in a separate
commit.