Improve detection of Hadoop taskID

Hadoop 2.5.x introduced a bug where the task attempt is used for the
task id. To cope around this, the code searches first for the task
attempt and only then falls back to the task id.

relates #280