ldlinux: Parse kernel type for labels
We need to parse the kernel type for labels aswell as things entered
on the cmdline, instead of always passing KT_KERNEL or KT_NONE to
execute(). Move the logic into a new helper function.
This fixes a bug where an incorrect kernel type would be passed to
execute() if anything other than a linux kernel (such as a .bin) was
specified in a LABEL's KERNEL argument, which resulted in the file not
being executed.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>