[Chip-Cert] Prevent extra bytes to be encoded when converting key to chip-b64 (#16121)
[Chip-Cert] Prevent extra bytes to be encoded when converting key to chip-b64 (#16121)

Observed :
- Existing code encodes bytes beyond the buffer actually containing the
key.
- The issue was sizeof(P256SerializedKeypair) that includes 'length'
field as well as 'bytes' field.

Changes :
- Make use of serializedKeypair.Length() to retrieve actual key length
- Clarify usage of buffer sizes vs actual used lengths
- Additionally, do not assume that P256SerializedKeypair 'bytes' field
is the first field of the data structure (i.e. has implicitly same
address as the structure itself)
project-chip/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip