add in exponential wait time for TaskState.TASK_FAILED cases, the defaul...

Added in exponential incremental retry wait time for TaskState.TASK_FAILED cases.
The default wait time is starting at 10 secs.
Maybe make the callback a single parameter in the second parameter list to make it possible to call it like this:

```scala
retry(x, y) { (driver, appId) =>
  // ...
}
```