* proc.c: Add {*}_min_max_arity and refactor.
  [Bug #7765]

* test/ruby/test_proc.rb: Fix wrong test
* proc.c (proc_curry): Fix arity check [Bug #5747]

* test/ruby/test_proc.rb: Test for above