Fixes a bunch of things.

Out of my head:
* makes the thing build with libtorrent 1.0
* fixes a crash in core
* rename some variables because it apparently succeed to offend people on 4chin
* other things