Introduce a context manager for compiler.returnable

Signed-off-by: Julien Danjou <julien@danjou.info>
misc. style fixes