Fix bugs in recursive_directory_iterator implementation and tests.

There are two fixes in this patch:

* Fix bug where the constructor of recursive_directory_iterator did not reset
  the error code if no failure occurred.

* Fix tests were dependent on the iteration order of the test directories.

llvm-svn: 273060
GitOrigin-RevId: e32264a4c092588d395b80be339eaed3565d423d
3 files changed