afsmtp: refactorized insert function to make the error handling readable

Signed-off-by: Juhász Viktor <jviktor@balabit.hu>
Signed-off-by: Laszlo Budai <stentor.bgyk@gmail.com>
afsmtp: stat counter[stored] fix

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>