replace LockGuard and LockGuardAdapter by a more general RAII template
Merge pull request #306 from reneme/replace_lockguard

Replace LockGuard and LockGuardAdapter by a More General RAII Template

It turns out, that my LockGuardAdapter template was broken and relying on undefined behaviour. This totally gets rid of it and replaces the former LockGuard by a more general RAII wrapper class.