SPARK-1632. Remove unnecessary boxing in compares in ExternalAppendOnlyM...

...ap

Author: Sandy Ryza <sandy@cloudera.com>

Closes #559 from sryza/sandy-spark-1632 and squashes the following commits:

a6cd352 [Sandy Ryza] Only compute hashes once
04e3884 [Sandy Ryza] SPARK-1632. Remove unnecessary boxing in compares in ExternalAppendOnlyMap
(cherry picked from commit 87cf35c2d6acc9649b3fb05648b79b9862b3959b)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>