Improve portability of "environment" test

The "environment" test was failing on ubuntu 12.04.
Improve portability of "xml" test

The "xml" test was failing on OS X, FreeBSD, and RHEL 6 due to inconsistent
output from the "toprettyxml" function.  Solution is to add more filtering
of output.raw.xml file (ignore blank lines and leading whitespace, and
split lines after the '>' character).
Fix the "threads" test

The "threads" test was failing sometimes on all tested platforms
because the output.j5 file would sometimes show that three tests were
run by a single thread (i.e., the two test cases that belong to the
serialization set, along with an extra test case).  This is expected
behavior based on the way that serialization sets are assigned to
thread numbers (the thread number for a serialization set is determined
solely based on information available at program initialization, before
any test cases are run, while the test cases themselves are not prioritized
based on whether they can be run in parallel or not).

The test case has been fixed by ignoring any tests in the output
that do not belong to the serialization set.
Merge remote-tracking branch 'origin/master' into topic/dnthayer/test-fixes
Merge remote-tracking branch 'origin/topic/dnthayer/test-fixes'

BIT-1055 #merged

* origin/topic/dnthayer/test-fixes:
  Fix the "threads" test
  Improve portability of "xml" test
  Improve portability of "environment" test