tools: mkimage: split code into core, default and FIT image specific