Improved reconnect functionality and removed a bug.

1.  Auto-reconnect is now also called on  IOError and SecurityError
events.

2. JavaScript callback on error is still functional; works alongside
reconnect.

3. On successful reconnection JavaScript function
"FlashlightOnReconnect" is called.

4. A bug removed. Reconnect function was being called repeatedly despite
success. It was due to timer not being stopped on successful
reconnection.
test

test
Revert "test"

This reverts commit 5ca484f099a5ff67ffb0ce0285bd3473629fbecb.
Merge pull request #3 from kryptBlue/master

Contract: Improved reconnect functionality and removed a bug.