shcodecs-record: cancel threads on cleanup
shcodecs-record: cancel threads on cleanup

Cancel threads and destroy mutexes during cleanup, ie. after
the user has stopped recording, before exit

kfish/libshcodecs,kfish/libshcodecs