Dont go through index and retrieve for rb_enc_get

There is no reason here to use the index first and do a lookup with that
after. We can get the encoding object here directly.
Add specs for Kernel#public_methods when given nil or false
Add specs for Kernel#protected_methods when given nil or false
Add specs for Kernel#private_methods when given nil or false
Fix Kernel#private_methods when given arguments