sp_lock(): insert a pause instruction if a spinlock can't be acquired.

Also yield to another process if acquiring the lock takes too long.
See Intel paper on efficient spinlocks.