userspace/sysdig: always notify the formatter of the end of file
userspace/sysdig: flush cout to print the event

When the format is JSON, the last event received is not printed
until another event is processed or sysdig terminates.
Merge pull request #210 from ret2libc/master

improve json output