Added the cancel() function to stop re-connections. Now all socket closures, even those resulting from error, will be reconnected. Closes #2.