erlang mqtt client extracted from /jinnipark/fubar, rebar friendly