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