Make #callbacks{} Dialyzer friendly

Properly typespeccing record fields is a prerequisite for Dialyzer to be able to discover incorrect usage of the fields. A previous error in the master branch (calling a fun stored inside the state record with incorrect number of parameters - see b4603f5f74d44c48726dc875bc7b1019fda2c102) could've been easily avoided if the record field typespecs had been in place.