primus/primus — pull request #325 by lpinca (2014-12-15 11:49:13+00:00)
Title: Refactor the `destroy` method

This refactors the `destroy` method.
The main differences with the old implementation are:

- The HTTP(S) server original listeners are reattached to server when the Primus instance is destroyed.
- By default, the cleanup is performed only when the HTTP(S) server closes.

This does not handle issue #318. To handle that we can introduce a new option and trigger a client side reconnect when closing all active connection, but we should ensure that this option can be used only when the `close` option is not `false`.