Tighten up error handlings

- Some exceptions like PartialShardFailureException don't return
  useful error messages. The nested ElasticsearchException that
  ResponseException carries around seems to be more reliable.
- Also look for automaton import before declaring it a regex
  failure. Other weird things (like broken config for the
  experimental highlighter) can cause InvalidArgumentExceptions
  as well.

Bug: 67095
Change-Id: Icc964bf6e84e5a4ad1edf89863d489021dcc9ac8
(cherry picked from commit 39f9088af15650bcc4347dcab57d85ca2d987758)