[IOT-1640] [IOT-1641] Fix MOT invalid pin handling
These changes do the following:
1. Set up PDM for each MOT attempt.
2. Clean up invalid PDM entries on failure.
3. Clean up invalid credentials on failure.
4. Break out success and failure paths for
MOTDtlsHandshakeCB to simplify code.
5. Update SubownerClient to allow a user to
provide a preconfigured pin instead of using
the default preconfigured pin.
Change-Id: I9c4e9b802e6fe6e68da18c34e9150c43ba01c445
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18029
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>