ruby-build: depends on openssl and libyaml

ruby-build can use these, if installed, instead of downloading and
installing its own copies of these libraries every time a Ruby
interpreter that needs them is installed.

libyaml is recommended, openssl is optional per discussion with
Mike McQuaid.

Closes #23724.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>