Feat improve error handling

It adds ability to reconnect after disconnected. 
It also try to enqueue each message that will be added while being disconnected. 

@errordeveloper We have to discuss the strategy of handling messages while the client stays disconnected.