In CutString, don't keep a reference to the original record

This commit also removes the explicit check against trying to access
fields before a String was loaded. We try to mitigate this risk by
returning null in such cases.
In CutText, don't keep a reference to the original record

This commit also removes the explicit check against trying to access
fields before a Text is loaded. We try to mitigate this risk by
returning null in such cases.
Apply reflection-based Hadoop 2 API compatibility fix to unit tests

A previous commit had dealt with the TaskAttemptContext change in the
Hadoop API within the TextSampler, which used to try to instantiate it
directly.  This commit refactors that code into a utility function (in
the Utils module) and uses it to fix some unit tests which presented the
same problem.
Fix bad sam record in unit test
From SamInputFormat, don't return objects that reference volatile data

This commit changes SamInputFormat and TextSamMapping so that they don't
return/contain objects that will be changed upon reading the next input
record.  Hadoop 2 seems to have optimized some input-related code
(probably LineRecordReader) to re-use its internal buffers.  Previously
TextSamMapping would optimistically keep a reference to the original
input Text object; with Hadoop 2, this object is getting wiped as the
next record is read. With this commit all necessary data is copied into
the object.