CHR-6375: Fixed crash on fallback from ANGLE to SwiftShader.

During fallback from ANGLE to SwiftShader it is required to unload
ANGLE libraries, otherwise SwiftShader will fail to load its own
libGLESv2 library.

Fixed ANGLE platform reset.

Fixed memory leak on X11 by fixing order in ShutdownGL.

Leak was occuring during fallback from libGL to software GL implementation
because ShutdownGL was cleaning GL implementation info before unloading
GL and therefore libGL was unloaded with known issue crbug.com/250813

Previous attempt with memory leak:
https://chromium-review.googlesource.com/640992

Reverted in:
https://chromium-review.googlesource.com/650286

Bug: 760063, 761930
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ibea80f560aa50ba48cbff6f39a664095db38daaf
Reviewed-on: https://chromium-review.googlesource.com/668357
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502409}
3 files changed