DRILL-1813: Fix race condition in UnlimitedRawBatchBuffer

Also change propagated exception to IOException instead of RuntimeException.

Don't mark a fragment as failed if it has been cancelled.
Check if writer state is OK before performing copy in copyAsValue() and copyAsField()