Add rb_update_max_fd to C-API
Add io/console extension from MRI with minor modifications

Fixes #2179