makefile: add dialyzer target
tests: fix dialyzer warnings