[PATCH v3 4/5] selftests/resctrl: Cleanup properly when an error occurs in CAT test