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.