LDAP KrbKey encoder and decoder fixes

These commits fix RT issues #7918 and #7919 while remaining compatible with unpatched code.