Json alert packet payload feature 1155 v3

Bases on #922 - includes some fixes (adapted patch to master, fixed stream handling and coding style) and enhancements (ability to dump payload in Base64), fixed compilation error on old kernels.