[IOT-1849] fixed null subject ID comparison logic
[IOT-1849] fixed null subject ID comparison logic

Issue description:
CTT sends requests over coap, but isRequestOverSecureChannel incorrectly concludes
that these requests arrived over a secured channel. That's because here:

if(memcmp(context->requestInfo->info.identity.id,
nullSubjectId.id, sizeof(context->requestInfo->info.identity.id)) != 0)

sizeof(context->requestInfo->info.identity.id) is larger than sizeof(nullSubjectId.id).

So, that compares a bunch of random bytes from the stack with the bytes from
context->requestInfo->info.identity.id.

This changes logic to compare like-sized objects.

patchset 2: resolved IOT-1849; created new IOT-1894 "Determine appropriate CA_MAX_ENDPOINT_IDENTITY_LEN" (see "TODO IOT-1894" comment).

patchset 3: comment typo fix

patchset 4: self review fixes

patchset 5: addressed Dan's feedback

patchset 6: addressed Phil's feedback

patchset 7: replaced if( with if ( throughout

Change-Id: I2781357c74a1e0c47a534bc6df2f2b790c0caae7
Signed-off-by: Nathan Heldt-Sheller <214cad4ab375dc179217f558f8b9854a693faf7f@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17503
Tested-by: jenkins-iotivity <d95b56ce41a2e1ac4cecdd398defd7414407cc08@iotivity.org>
Reviewed-by: Kevin Kane <cd40c34e976f30c9e62efcf24e04c516bc3a3b05@microsoft.com>

iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity