export types for dialyzer

Export types from Erlang sources where needed. Add dialyzer targets to
Makefile and .gitignore.