elasticsearch try_to_index: loop correct number of times

refs #7028
elasticsearch try_to_index: log and reraise exception

This allows Elasticsearch exceptions that occur while trying to index
to be propagated if the maximum number of attempts is reached. The old
behaviour was to silently continue, which could cause indexing to appear
to be successful when it had actually failed.

refs #7028
elasticsearch: avoid redefining builtin types

refs #7028
elasticsearch: tag lists with the type of their contents

Fixes #7028, which was caused when lists named "value_list" could have
more than one type of content.
elasticsearch: use isinstance() instead of type() is klass

refs #7028