SPARK-3039: Allow spark to be built using avro-mapred for hadoop2

SPARK-3039: Adds the maven property "avro.mapred.classifier" to build spark-assembly with avro-mapred with support for the new Hadoop API. Sets this property to hadoop2 for Hadoop 2 profiles.

I am not very familiar with maven, nor do I know whether this potentially breaks something in the hive part of spark. There might be a more elegant way of doing this.

Author: Bertrand Bossy <bertrandbossy@gmail.com>

Closes #1945 from bbossy/SPARK-3039 and squashes the following commits:

c32ce59 [Bertrand Bossy] SPARK-3039: Allow spark to be built using avro-mapred for hadoop2

(cherry picked from commit c243b21a8ba2610266702e00d7d4b5443cb1f687)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>
Merge branch 'branch-1.1' of github.com:apache/spark into csd-1.1
Merge branch 'csd-1.1' of github.com:markhamstra/spark into csd-1.1