Refactor RubyFileStat and RubyFileTest to use FileResources

Part of https://github.com/jruby/jruby/issues/1452 effort.