test: Fix test case failures on F20
test: Split out automated tests from test.c

Separate the extended tests run by the driver program out of test.c.
Run the extended tests even when not under Valgrind.
Fix crash if openslide_read_region() fails when dest == NULL