[Flag] Check flags consistency when setting a flag

There are existing some dependencies between some flags.
For example, if setting auto_rebalancing_enabled to true,
unlock_experimental_flags must be set to true. Currently
Kudu will not check flags consistency when setting a flag
using GenericService::SetFlag() RPC. That will cause unsafe
flags or experimental flags or flag group validators
unavailable.

Therefore this patch will check flags consistency when
setting a flag. First try to set this flag, then check
all flags consistency, if failed, roll back. This patch
supports to check unsafe flags, experimental flags,
flag group validators. Standard validator defined by
DEFINE_validator() will be checked when calling
google::SetCommandLineOption().

By the way, to support a group flag, for example,
rpc_certificate_file, rpc_private_key_file, and
rpc_ca_certificate_file, which all should be set at the same
time, this patch will add a parameter: --skip_check_consistency
to skip check consistency. There they can be set one by one.

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