Check libraries (Fixes #74)

Here was the initial output: https://gist.github.com/certik/5771099
But now it's all fixed except Python, see the comments below.

Since a lot of the core libraries have changed in this PR including Python itself, we need to build the whole stack again before merging to make sure that we didn't break anything.

TODO:

* [x] thoroughly test the whole stack on multiple computers
* [ ] do the same check for executables (currently only .so libraries are tested)