Add user-defined/set errors; Fix minor VGetNext error handling bug

QCBORDecode_SetError() is added so QCBOR users can set an error and have it propagated up.

The data and label type of the item returned by VGetNext is correctly set to NONE when the error occurs right away, but was not set to NONE when the error occurred previously. This is fixed. This is a minor bug and only affected error handling use that relied solely on checking that the data and label were NONE.

Added more testing of error processing.


* Add SetError(); VGetNext error bug fix

* Documentation fixes

---------

Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c
index 72a81c6..2188211 100644
--- a/src/qcbor_decode.c
+++ b/src/qcbor_decode.c
@@ -2660,6 +2660,8 @@
 QCBORDecode_VPeekNext(QCBORDecodeContext *pMe, QCBORItem *pDecodedItem)
 {
    if(pMe->uLastError != QCBOR_SUCCESS) {
+      pDecodedItem->uDataType  = QCBOR_TYPE_NONE;
+      pDecodedItem->uLabelType = QCBOR_TYPE_NONE;
       return;
    }
 
@@ -2674,6 +2676,8 @@
 QCBORDecode_VGetNext(QCBORDecodeContext *pMe, QCBORItem *pDecodedItem)
 {
    if(pMe->uLastError != QCBOR_SUCCESS) {
+      pDecodedItem->uDataType  = QCBOR_TYPE_NONE;
+      pDecodedItem->uLabelType = QCBOR_TYPE_NONE;
       return;
    }