Implement locking with `lockfile`.

This depends on the changes in https://github.com/broccolijs/broccoli/pull/141.