Revert of Replace some deprecated usages of readdir_r with readdir (patchset #5 id:80001 of https://codereview.chromium.org/2411833004/ )

Reason for revert:
Speculative: appears to be causing flaky crashes in android_webview_test_apk and adversely affecting the CQ as a result.

e.g. https://build.chromium.org/p/chromium.linux/builders/Android%20Tests%20%28dbg%29/builds/36829

The last few messages in the logcat include:

Device(06ec840ef0e949a6) 11-01 01:44:07.189 27745 27808 E chromium: [ERROR:simple_index_file.cc(143)] Could not get file info for /data/data/org.chromium.android_webview.shell/cache/org.chromium.android_webview/137034c0a767955d_0
Device(06ec840ef0e949a6) 11-01 01:44:07.189 27745 27808 E chromium: [ERROR:simple_index_file_posix.cc(52)] readdir /data/data/org.chromium.android_webview.shell/cache/org.chromium.android_webview: No such file or directory
Device(06ec840ef0e949a6) 11-01 01:44:07.189 27745 27808 E chromium: [ERROR:simple_index_file.cc(544)] Could not reconstruct index from disk
Device(06ec840ef0e949a6) 11-01 01:44:07.209 27745 27788 F chromium: [FATAL:simple_index.cc(404)] Check failed: load_result->did_load.

I'll try to get a fully symbolized trace tomorrow.

Original issue's description:
> Replace some deprecated usages of readdir_r with readdir
>
> readdir_r is deprecated and using it with recent compilers cause some
> warning that may be treated as build errors. readdir is recommended
> instead, see http://man7.org/linux/man-pages/man3/readdir_r.3.html
>
> This CL replaces some usages of readdir_r with readdir in order to fix
> build errors with use_ozone=1.
>
> R=jln@chromium.org,gavinp@chromium.org,dcheng@chromium.org
> BUG=457759
>
> Committed: https://crrev.com/c2fdc2710b700158ad46111be664eac7ede0fdce
> Cr-Commit-Position: refs/heads/master@{#428867}

TBR=dcheng@chromium.org,gavinp@chromium.org,jln@chromium.org,jorgelo@chromium.org,bbudge@google.com,tonikitoo@chromium.org,fwang@igalia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=457759

Review-Url: https://codereview.chromium.org/2466773003
Cr-Commit-Position: refs/heads/master@{#428934}
3 files changed