[TEST] Wait for shards to allocate before cleaning caches
Show stacktrace of startup exception

This makes it a lot easier to debug a problem like

{2.0.0-SNAPSHOT}: Startup Failed ...
- NumberFormatException[For input string: ""]

because now you see from where the error comes from (which might be from
a plugin!).

Whether or not the stacktrace is displayed is controlled by bootstrap
log level setting, so that bootstrap: DEBUG displays the stack trace on
output, like it does on log, as suggested by @imotov
https://github.com/elasticsearch/elasticsearch/pull/5187#issuecomment-38955506