[WIP] Remove dead #ifdefed code

I made a simple [analyzer](https://gist.github.com/Hinidu/2a75fd1caca953435914) to find symbols which are tested in ```#ifdef```s but are not defined explicitly.
Now I want to go through [the resulting list](http://sprunge.us/RQKf) step by step and remove dead code related to legacy systems and other stuff which we will not use in the future.
Inspired by #808