updated unit tests
small refactorings,  changed device id to be in "uid" param
debug save recording files in preference,  added debug-mode time measurements to response json (ugly…)
Removed read-write loop in "uploader" thread - now  http stream reads directly from encoded fifo