loader: prepare commands later

It is important that we parse the command line as early as we can, because the
global switches (like --verbose) controls the general behavior of the system.
But actually preparing the command lines to run can come later, right before we
actually go execute the commands.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
loader: set an environment variable with the amount of cpus we have

This patch creates an environment variable, OSV_CPUS, that will be present at
boot and as the name implies, contains the amount of cpus we have in the
system.

This can be useful to create appliances whose parameters will be conditional to
the number of cpus in the system. Other properties can easily follow.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
loader: support environment variables in command line

This patch extends our prepare_command function to take a variable in the
command line.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>