Frame: add attribute 'code' for close frame

Hi, 

this patch add 'code' attribute for close frame.
if frame is close frame and code attribute is defined, encoded code number will be inserted to head of buffer.