[messenger] Initialize SASL proto name to principal

Adding master in case of custom kerberos principal name didn't work
because the non-default principal name was not propagated to the
MessengerBuilder every time and it used "kudu" instead of the one
provided by the kerberos service. If GetLoggedInUsernameFromKeytab is
available it provided to the MessengerBuilder KuduClientBuilder objects.
If it is not set the sasl_proto_name remains at the default "kudu"
value.
However this change is not enough because ServerBase::ShutdownImpl
called DestroyKerberosForServer which destroyed the global state which
GetLoggedInUsernameFromKeytab uses. The DestroyKerberosForServer call
was moved to ServerBase::~ServerBase().

The new test is using non default principals, adds two new masters, runs
a smoke test. After that one master is shut down to simulate recoverable
master error, and the smoke test is executed again.

Change-Id: Ie8decbd0b3e54df42bb0b9b14fc5ec291cd70b8b
Reviewed-on: http://gerrit.cloudera.org:8080/20708
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <alexey@apache.org>
5 files changed