Various improvements and fixes.

- Added a base class to handle all libtorrent alerts.
- Fixed torrent complete event.
- Fixed torrent state changed event.
- Fixed torrent state saving and loading.