tlv: add new Type() and Encode() methods to Record
tlv: add new Type() and Encode() methods to Record

In this commit, we add two new method so the `Record` struct: Type() and
Encode(). These are useful when a caller is handling a record and may
not know its underlying type and may need to encode a record in
isolation.

LightningNetwork/lnd,aakselrod/lnd,LightningNetwork/lnd,aakselrod/lnd