Fix some dialyzer warnings

Three bug fixes are included:

* Fix `make dialyze` to stop checking for race conditions (http://erlang.org/pipermail/erlang-bugs/2014-July/004518.html)
* Fix `:sys.replace_state` for `GenEvent` (GenEvent should have some tests for system messages)
* Fix mix lock files to always use maps (the code and docs didn't quite match up here but I think I got it right)

I think I handled most obvious warnings (except for compiler unmatched warnings) that aren't compiler generated. Adding specs to `Regex` has generated quite a few more warnings (https://github.com/elixir-lang/elixir/issues/2750), please be extra diligent when review the return values of these specs as I am not overly familiar with `Regex`.

There is still an issue with unmatched warnings from `for` comprehensions, I am unsure whether this is solvable by changing the generated Erlang AST or not.
Shouldn't we keep both?