fixed JRuby schema validation when XSD has DOCTYPE to DTD

consolidation of https://github.com/sparklemotion/nokogiri/pull/791 and https://github.com/sparklemotion/nokogiri/pull/810