Add dialyzer and xref targets

Dialyzer currently fails on Erlang versions prior to R16B01 (I didn't
test R16B actually). Seems to be this [1] issue. Otherwise dialyzer and
xref run cleanly.

[1] http://erlang.org/pipermail/erlang-questions/2011-April/057437.html