objfun: Factor out mp_setup_code_state() function to set up code_state object.

It needs to be reused for generator functions, too.
objgenerator: First iteration of refactor to use mp_setup_code_state().
objgenerator: Finish refactor to use mp_setup_code_state().
tests: Add testcases for "complicated" args to generator functions.
objfun: Remove no longer used mp_obj_fun_prepare_simple_args().