Add QCBOREncode_EncodeHead() and other for bstr wrapping

This improves the support for bstr wrapping (so it can be hashed for use cases like COSE).

QCBOREncode_EncodeHead() is now a public function.

There is some simplification to indefinite length encoding.

There is some refactoring that should give smaller code size when bstr wrapping is not used.
diff --git a/test/qcbor_encode_tests.h b/test/qcbor_encode_tests.h
index d768889..204bdee 100644
--- a/test/qcbor_encode_tests.h
+++ b/test/qcbor_encode_tests.h
@@ -173,6 +173,7 @@
 int32_t ExponentAndMantissaEncodeTests(void);
 #endif /* QCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA */
 
+
 /*
  Test the error cases when encoding CBOR such as buffer too large,
  buffer too small, array nesting too deep. Aims to cover the error
@@ -181,4 +182,12 @@
 int32_t EncodeErrorTests(void);
 
 
+/*
+ Test QCBOREncode_EncodeHead(). This is a minimal test because every other
+ test here exercises it in some way.
+ */
+int32_t QCBORHeadTest(void);
+
+
+
 #endif /* defined(__QCBOR__qcbor_encode_tests__) */