refactor cargo.bbclass for easier use when we are not directly driving cargo