Minor memoryleak fixes
Fix buffer increment error in loop
Exit gdb after processing commands
properly initialize semaphores
Let cache object handle zlib c_stream object
Throw on Http readBytes problems
Adjust log levels to avoid populating the log with unsignificant information