Fix refcount leaks in Lock.
Update 0.4.0 release date to reflect new commit.