lib: Move option parsing to lib

Separate command line option parsing from the VM launcher.

Signed-off-by: Pekka Enberg <penberg@kernel.org>