buffermemory: add function to copy memory
Copies data from buffer even across several memory segments.
rtpjpeg: fix copying of quant data if it spans memory segments
rtpjpeg no longer joins all memory segments before encoding. Ensure we copy the data from the correct segments.
Re-arrange test data so it's not correctly ordered and add test.