MP1-4155: fixed bug in conversion of string to unsigned long
changed logging of unhandled excepions
changed live stream performance in AFHS and RTMP