Fix issue #878

Added a sentence to check the slave's state in doReliableRegistration() to make sure that the function returns when the slave's state is TERMINATING.

Also, to write the test, I need to make sure there's no additional doReliableRegistration() calls, so I added  NO_FUTURE_PROTOBUFS() and NO_FUTURE_MESSAGES() to make sure there's no more SlaveReregisteredMessages.

See https://issues.apache.org/jira/browse/MESOS-878