[SPARK-3535][Mesos] Fix resource handling.

I would just make this object `private[spark]` altogether