Minor changes to PR #2813. also fix #2479
Minor changes to PR #2813. also fix #2479

* Function to test for slave handshake renamed slaveIsInHandshakeState.
* Function no longer accepts arguments since it always tests the
  same global state.
* Test for state translated to a range test since defines are guaranteed
  to stay in order in the future.
* Use the new function in the ROLE command implementation as well.

ksarch-saas/redis,ksarch-saas/redis,ksarch-saas/redis,ksarch-saas/redis