[PATCH v3 18/25] virTypedParamsValidate: Refactor variable declaration and cleanup