Wrap grn_expr_code_get_weight() in ruby method

It is similar approach to #113.