SOLR-5795: harden leader check to log cleanly (no NPE) in transient situations when there is no leader due to election in progress

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1584097 13f79535-47bb-0310-9956-ffa450edef68