Hash#deep_*_keys(!) recurse into nested arrays.

Update of #9720.
- Fix a typo.
- Squash commits.
- Rebase to recent upstream.