crash: split vmcoreinfo exporting code out from crash_core.c