libdpx: modify identifiers, check for pthread_create ret

I need to do a lot more error checking.
libdpx: copy frames in order to prevent losing control of memory, fix leaks