Reset device to initial state in disconnect()

Added code to reset the device to the initial state when disconnect() is called. This prevents calls to configured() from returning true when the device has been disconnected.
Merge pull request #353 from neilt6/master

Reset device to initial state in disconnect()