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