Refactoring torrent client

There should be no breaking changes; just extracted the code into modules. The next step would be to implement a better interface between the modules: currently they rely on `engine` as a _"global"_ object, mostly because of the events.
> initialize the module with the engine and let it do its job on its own.

I think adding the dependency on `engine` creates unnecessary coupling. However, moving the interval inside the module does make sense.