cls_statelog: fixes

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
test: test for cls_statelog

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>