Fix MSVC compiler/linker warnings

Sometimes the generate_castling template "ci" parameter is optimized away
is____ functions require an unsigned char instead of a char
Casting to the appropriate type is required
PieceValue should always have CACHE_LINE_ALIGNMENT

No functional change