Improve redis-trib replica assignment

This tiny bit of code has gone through so many revisions.  Hopefully
it's more correct now.

Fixes #2204
Merge pull request #2227 from mattsta/fix/trib/assignment/master-replica

Improve redis-trib replica assignment