sh implementation to avoid unwanted resizes during iteration.

This is a port of the following AOSP patch:
  https://android-review.googlesource.com/#/c/68853/

It fixes a bug that happens when trying to delete items from
a lhash table while it is being iterated over with a call
to lh_doall or lh_doall_arg.

It looks like the source tree is slightly out-of-sync from
the state of running ./import_from_android.sh, but the differences
are minor / not significant.

This patch tries to fix a P1 bug, so doesn't try to address this
(the differences have been removed for easier reviewing).

BUG=298606
R=agl@chromium.org,rsleevi@chromium.org,wtc@chromium.org
TBR=darin@chromium.org

Review URL: https://codereview.chromium.org/59793002

git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/openssl@233017 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
9 files changed