[IOT-1449] mbedTLS: Use wcslen instead of lstrlenW on Windows
[IOT-1449] mbedTLS: Use wcslen instead of lstrlenW on Windows

lstrlenW is not allowed in Windows Store applications. Use wcslen
instead.

Also fix a nearby narrowing size_t to int conversion to make sure
it's safe.

Change-Id: I14d37b6a0d6c82444f4733f5d54bd8173ca62b71
Signed-off-by: Kevin Kane <cd40c34e976f30c9e62efcf24e04c516bc3a3b05@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13183
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Dave Thaler <8a98d0850f57b73c42d096f8f8b11e2d5522d554@microsoft.com>
Reviewed-by: Randeep Singh <46ce9385024397d3e4d9ed63be2e0a0d801e95b7@samsung.com>
(cherry picked from commit aa49bbd28a78a486df9568b3867a373100e92e2f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13207

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