Fix dbg_mean_of() for negative numbers

Type should be int64_t instead of uint64_t

No functional change.
Rename castling flag to castling right

This is a more conventional naming as
reported also in:

http://chessprogramming.wikispaces.com/Castling+rights

No functional change.
Retire SERIALIZE macros

Explicitly write the 'while' loops. This adds some
code but makes clear what's the code behind the
macro.

No functional change.
Simplify generate<EVASIONS>

No speed regression, tested with both perft and
bench.

No functional change.