Allow subidentifiers of size UINT_MAX

Make overflow check more accurate and add testcases

Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/library/oid.c b/library/oid.c
index 02e4136..b13c76b 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -1012,7 +1012,7 @@
         }
     }
 
-    if ((UINT_MAX - component2) <= (component1 * 40)) {
+    if (component2 > (UINT_MAX - (component1 * 40))) {
         ret = MBEDTLS_ERR_ASN1_INVALID_DATA;
         goto error;
     }