Instead of using a static global context data struct, pass the data around. This is a first step to create a C API for ubiformat. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>