tests/elasticsearch: Catch painless script errors and pretty print them
Debugging update painless script is hard as errors are returned in a
not really readable JSON format.
To gain debuggig time, wrap search.origin_update calls when running
elasticsearch tests in order to catch painless script errors and
pretty print them.
Tests will also immediatly fail when such errors are detected.