Pass parameters to shared functions via unlock.

Now when `unlock` is called to release an exclusive lock, the parameters
passes to `unlock` will be passed to the functions given to subsequent
calls to `share`. Simplifies the implementation of latches.

Closes #23.