Prevent compilation errors with clang and Boost 1.57.

Apparently, quite a few invocations of boost::lambda::bind broke
under clang after the Boost 1.57 release. I'm not sure whether Boost
or clang is to blame for this, but since I can't fix either, for
the time being I'm replacing the broken lambdas with function objects
(including some that weren't really readable, so it's not a total
loss after all).

Closes #163