Consolidate two implementations of "sh" into one in preparation for timeout code

Introduces @@supports_force_encoding static member and consolidates the two different versions of "sh" into one in order to central
ize upcoming timeout logic etc. Also introduces pre-Ruby 1.9 logic for calling IO.popen without options hash.