[PATCH v3 1/2] kunit: split resource API from test.h into new resource.h