[PATCH REPOST 2/5] cleanup: extract functions from kdump.sh to kdump-lib.sh