Add/use xp_lockfile() to support blocking file range/region lock acquisition
Under heavy loads, I've found periodic non-blocking lock attempts just aren't reliable enough: in particular, on Vertrauen, the guest user account record in the user.tab file gets read and written-to A LOT (updating stats), and under heavy loads (especially with hundreds of web client sessions), I'd get timeouts attempting to lock the guest record in the user.tab (after about a minute of periodic retries) - so let's just block "forever" to get the user record lock (or until signaled or notified of a deadlock). With this change, I've not had any user.tab lock errors or apparent deadlocks. Let the underlying OS/filesystem handle queuing and deadlock detection, when supported. lock() still behaves as before: non-blocking lock attempt.