Changed routing diagnosis socket state from enum to int so that they can
be bitwiseor'ed together.

Review: https://reviews.apache.org/r/26236
Included a missing header file in src/Makefile.am.
Fixed the flaky SlaveRecoverTest.MultipleSlaves.

Review: https://reviews.apache.org/r/26243