[preview] Stats log api v0.4

Preview of stats logging API.

Prscript:
- PR build: https://buildbot.openinfosecfoundation.org/builders/inliniac/builds/54
- PR pcaps: https://buildbot.openinfosecfoundation.org/builders/inliniac-pcap/builds/54