Propagate io engine error back to 'td', if not already done

Signed-off-by: Jens Axboe <axboe@kernel.dk>
null: 'td' isn't actually unused, unmark it

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Split out td error handling code

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Move unused and other attributes to the compiler section

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Kil unneeded forward declaration

Signed-off-by: Jens Axboe <axboe@kernel.dk>
ioengine: kill unneeded thread_data forward declaration

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Get rid of mixed code/data sections

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Add -Wdeclaration-after-statement to compiler flags

Signed-off-by: Jens Axboe <axboe@kernel.dk>