pfkey2: use correct value for a key length
The length of key data is specified via sadb_key_bits field.
Use specified size for buffer allocation and key copying.
Also add a check that the value of sadb_key_bits is not zero,
as explicitly required in RFC 2367.
PR: 241010
Submitted by: jean-francois.hren at stormshield eu
(cherry picked from commit 04207850a9b988d3c04e904cb5783f33da7fe184)