Changes to conform to c++17 standard.
Some fixes to bring us closer to using -std=c++17
- Remove binary_function and unary_function
- Remove "register" keyword since it is deprecated.
- Convert std::bind2nd to lambda functions.
- Convert std::random_shuffle to std::shuffle using mt19937