Move cli context initialization to init_context

The context object is initialized in main and parse_options. Rename the
function to init_context and do the main initialization there.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>