Added Locker class, synchronized is exception safe

A Locker object will hold a lockable object.  When it is constructed it
will lock the contained object, and unlock when destructed.  This is
slightly slower, but it's exception safe.