Update CI builds to use newer rubies and ensure compatibility of codebase with them. Remove deprecations. Keep Ruby 2.5 as a minimum.