common: Move panic handler out of libcommon.