ruby: tests: isolate boilerplate in common file

Isolate in a common file all the standard boilerplate in tests, i.e. the
import of the test framework and the guestfs module (including the
import path hack needed for the latter).

(This is the same change as fbae7f3e69ce598c52af71ec204f8dbd0a9ce5e5
in libguestfs.)
ruby: tests: convert from Test::Unit to MiniTest (RHBZ#1090407)

Convert the tests to the MiniTest test framework, but keeping the usage
of the old Test::Unit as fallback in case MiniTest is not available.
In the latter case, use a bit of "glue" to make the old API look like
the new API, so we can just rely on the newer MiniTest API.

(This is the same change as 2f5e9066db817f75b245f256abc0c64dd1ae54eb
in libguestfs.)