userspace/libsinsp: remove duplicated code
userspace/libsinsp/filterchecks: make extract_as_js virtual
userspace/libsinsp/eventformatter: print ']' only if we have printed '['
Merge pull request #214 from ret2libc/json-str-refactoring

userspace/libsinsp: remove duplicated code