Add flags to allow custom LDAP bind names
Add flags to allow custom LDAP bind names

Some LDAP server configurations don't allow us to bind directly using
the short name, but instead need a more structured user name. It's not
sufficient to require the client to provide the name, because the
username is also handed to Sentry, which would get confused by all the
"DN=foo,CN=bar..." LDAP weirdness.

Hive provides two simple options to specify either the domain or the
base DN. This patch implements both, but also adds the more general
--ldap_bind_pattern which is provided directly to LDAP with the string
sufficient to implement the other two, I include all so that simple use
cases don't require understanding the string manipulations that Impala
must perform.

Change-Id: I2c1594295a39056a9b95a6a76756c5df22a34ee5
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2872
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 3025aa48c6c137a50871a4fd8d564e9ff2e47605)
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2888
Reviewed-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>

michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala