add configure option to explicitely turn on elasticsearch tests

Otherwise make check et al fail on systems that don't have an
ES test environment. Follows the same way this is done for MySQL.