Support reference uri & fix gobs of C code

Yeah...I dislike this particular idiom too but it seems to be standard for rb_define_method to match the int main(int argc, char* argv[]) style:
  http://ruby.wikia.com/wiki/C_API/Classes_and_Modules

I did some limited searching, and think this is common enough to probably warrant keeping.