base: Add RecursiveLock

This change extends the existing StaticLock type to support
recursive mutexes, and adds a new lock type "RecursiveLock"
which allows recursive locking / unlocking.

Both can be used in AutoLock and ConditionVariable classes.

Change-Id: Ic62d51c610301eac11cebb290391a488a9961b46
2 files changed