Add scoped_ptr support to Lock wrappers