and do some other isc mem cleanups. (cherry picked from commit 24f2cc7d06) Conflicts: CHANGES
24f2cc7d06