Don't overload the record constructors

Use 'from_erl' instead of 'new' when transforming erlang records into
elixir records.
Shuffle some types

Put types in the modules they belong to instead of including them in
each one from the header.
Adjust to some elixir changes
A refname is always a binary