memory: on_allocation_failure(): extract maybe_dump_memory_diagnostics()
memory: on_allocation_failure(): extract maybe_dump_memory_diagnostics()

This piece of code is about to get more complex, so extract it into a
function of its own.

dreamsxin/seastar,scylladb/seastar,syuu1228/seastar,cloudius-systems/seastar,avikivity/seastar,avikivity/seastar,avikivity/seastar,cloudius-systems/seastar,cloudius-systems/seastar,scylladb/seastar,dreamsxin/seastar,dreamsxin/seastar,syuu1228/seastar,scylladb/seastar,syuu1228/seastar