Write perft(N-1) into cout
So that one can redirect cout to /dev/null and only print print cerr in the terminal (for more accurate speed
tests).

Suggested by Marco.

No functional change.
Rework perft implementation

Unify various perft functions and move all the code
to search.cpp.

Avoid perft implementation to be splitted between
benchmark.cpp (where it has no reason to be) and
search.cpp

No functional and no speed change (tested).
Move to_char() and to_string() to notation
Where they better belong.

Also, this removes '#include <string>' from types.h, which reduces the amount of code to compile (every
translation unit includes types.h).

No functional change.