SPARK-2761 refactor #maybeSpill into Spillable

Moved `#maybeSpill` in ExternalSorter and EAOM into `Spillable`.
We don't need to match here to find out what type to return. We already know this through `usingMap`. Also, if you follow my suggestions elsewhere then we can just the `map` and `buffer` variables directly instead of returning it and trying to cast it back to some type `A`