Fix PMI shutdown problem with Hydra PMI

The core of that fix is that I determine whether the process was spawned by srun explicitly (via DMTCP wrapper) or not.
If we use SLURM PMI: srun <slurm-opts> dmtcp_checkpoint <dmtcp-opts> ./mpiapp <app-opts>
DMTCP won't notice srun. In this case I assume that we need PMI shutdown.
Otherwise - we don't need it.