Use Optional::Dependencies for CDBICompat and its tests

This allows the test to check for them before loading DBICTest and
DBIC, thus speeding up the test skips a lot (down from 14s to 1s for
'prove -l t/cdbi' on my Linux box, and down from 1026s to 871s for the
whole test suite on a Windows VM).
Only load DBICTest::Schema when needed in tests

Make sure to not vivify $DBIx::Class::VERSION, since before perl 5.16,
this causes ->ensure_class_loaded to think the class is loaded.