Invoke the error function on async connect/send failures
Pass the MsgId to the error_fun, which is required for proper handling
Add parse_status(10) -> shutdown.
Merge pull request #2 from layerhq/feature-MSG-474-async-error

Invoke the error function on async connect/send failures