Code review fixes for the ResourceManager.

* The ResourceManager now uses randomness to avoid choosing the same
  worker all the time in cases of ties for least busy worker.
* Fix some typos.