[SPARK-3456] YarnAllocator on alpha can lose container requests to RM

I think it's safe to expose the variable as long as it does what its name suggests. We actually already do this elsewhere in the same class for similar variables (e.g. `getNumExecutorRunning` or `getNumExecutorFailed`). In our case, we can't make just those changes because we increment `numPendingAllocate` before we `allocateContainers`, but we can easily work around that as you mentioned. These allocation requests aren't technically pending until we've submitted them, so I think it makes sense to increment `numPendingAllocate` afterwards.

Anyway, just a minor suggestion since this is an internal API. It's fine to leave it as is if you prefer.