DRILL-4574: Avro Plugin: Flatten does not work correctly on record items
* When applied to arrays of record, the flatten function always returned the last item only in the array when querying avro records
* The problem was that the RepeatedMapWriter's start() and end() methods wer only called once and not for every array item
* This commit adds tests that show the expected behaviour for both non-primitive and primitive arrays
close apache/drill#459