[SPARK-3187] [yarn] Cleanup allocator code.

Move all shared logic to the base YarnAllocator class, and leave
the version-specific logic in the version-specific module.

I think the only difference is visible to all of yarn (since its private[yarn]) vs just making this inner class totally private.  Its not a big deal.

I'll give this a try on 0.23 once I finish testing the rc for 1.1.