make elasticsearch client a singleton

make elasticsearch client a singleton, to avoid creating multiple clients which all need to be manually closed before the process exits