stats log api v1.4

- Introduces an output API for Stats
- Converts existing stats.log output to this API
- Add Lua support for this API (https://redmine.openinfosecfoundation.org/issues/1309)

Prscript:
- PR build: https://buildbot.openinfosecfoundation.org/builders/inliniac/builds/57
- PR pcaps: https://buildbot.openinfosecfoundation.org/builders/inliniac-pcap/builds/57