locks: spinlock/mutex: added a wait function.

mutex_wait and spin_lock_wait wait for a spinlock or mutex to become
available. This function wont return untill the lock becomes unlocked.
After it returns it is safe to asume that the lock is unlocked.

Signed-off-by: Michel Megens <dev@michelmegens.net>