Increased default connection timeout margin to 250ms.
Fixed bug in connect subroutine.
Cleared subscriptions state upon (re)connecting to broker to allow for re-subscriptions.