Refactor xunit.base

Using extract method technique, moving methods params to constructor
param and removing duplication.
Improve test

Improve the test to check if a class is a valid class for test, by
checking if it's also subclass of unit.TestCase.