Fix a major memory leak in the SLURM RAS, and cleanup a bit of code there. This commit was SVN r14164.