Added Rubocop, upgraded RSpec and fixed has_lock?

* Added rubocop to enforce ruby style.
* Upgraded RSpec to 3.x expectations.
* The `has_lock?` method returns a `nil` instead of `false` in some tests. Now we compare to `false` explicitly.
Unless I am missing something, It didn't, no. The result is identical to the old code. You don't need `{ ... }` here because anything like `x => y` is automatically a hash.