appsrc: Fix use-after-free when making buffer / buffer-lists writable
make_writable can cause a reallocation of the buffer, meaning that obj would point to an invalid object, both for buffer and for bufferlist.
During testing using ASAN we saw a heap-use-after-free, caused by using the obj variable, as the make_writable call had allocated a new buffer.