Key area and certificate can be optionally appended and/or preserved, respectively. Trimming is supported. Also added a bunch of ZLT packet related fixes to usb.c, as well as a function to properly cancel an ongoing file transfer.