Run checkIfIamLeader in a separate thread

Initial patch for [SOLR-6261](https://issues.apache.org/jira/browse/SOLR-6261) to run `checkIfIAmLeader` in a separate thread, passes all tests.