Collect the post and link ids that will be reassigned before running the update in `remove_user_from_blog()`. Use `array_walk()` instead of `array_map()` when invalidating the caches for the collected ids.

Props kovshenin.
Fixes #25545.


Built from https://develop.svn.wordpress.org/trunk@27152


git-svn-id: http://core.svn.wordpress.org/trunk@27019 1a063a9b-81f0-0310-95a4-ce76da25c4cd