fix function defs for function that take vsn(), which can be an atom
include state in format_error/2
use providers PRV_ERROR and format_error/2
Merge pull request #236 from tsloughter/format_error2

Some changes for providers as I work on rebar3