locking: Move the spinlock code to kernel/locking/