[SPARK-3921] Fix Standalone mode

The goal of this patch is to fix standalone mode, which was broken in https://github.com/apache/spark/commit/79e45c9323455a51f25ed9acd0edd8682b4bbb88#diff-79391110e9f26657e415aa169a004998R153.

More details can be found in the JIRA: [SPARK-3921](https://issues.apache.org/jira/browse/SPARK-3921)

I do not know how to test Mesos, but I have tested this patch in Standalone mode.
Merge branch 'netty-test' of github.com:aarondav/spark into netty
Merge branch 'netty-test' of github.com:aarondav/spark into netty
Extra testing stuff