Fix bug affecting SubProcesses

Fix a bug affecting SubProcesses. It affects
them when input files are being merged and
the input files have differing BranchIDLists
and the SubProcess produces something.
An attempt to use a Ref or Ptr in the SubProcess
or any subsequent job using its output can result
in a failed assert which aborts the job. The
BranchListIndexes which are used to reference
Ref's become corrupt.
Unit test fixes unrelated to the primary commit

Unit test fixes unrelated to the primary commit
that were probably causing the jenkins unit
tests to fail. I think some cleanup mechanism
deletes the files created in early steps which
are needed in later steps of the shell script.
Another unrelated unit test fix

Here is a fix for the standalone unit test failure.
Probably this does not help, but there was some
question whether CPPUNIT would run the two subtests
in the right order and this fix guarantees that.

I suspect the actual cause of the recent errors is
that the tests are being run on a machine with more cores
or that is faster and the cleanup is occurring earlier,
too early. Files that are still being used are getting
cleaned up earlier than before.

None of this has anything to do with the changes
in the original pull request
Merge pull request #3846 from wddgit/subProcessBugFix

Core -- Fix bug affecting SubProcesses