move state functions to ngx_http_mruby_state