Increase efficiency of SAN generation / disambiguation
**************** Risky patch! **********************
The algorithm used for disambiguating and generating SAN was extremely
inefficient, because it generated all pseudo-legal moves from the relevant
position, and then for each of those did a check test (involving generation
of all moves of the opponent), before determining if the move matched the
(proposed or given) SAN move. While it is pointless to generate moves
with a piece that does not match (let alone checking them for legality).
And for a piece that matches, it is pointless to test legality of moves
that do not match the to-square.
To speed up the process GenLegal and GenPseudoLegal have been equiped
with an argument that can indicate the piece type of the required move,
so they can skip generating moves with other pieces. TestLegality,
Disambiguate and CoordsToAlgebraic make use of this facility, and set also
(through global variables rFilter and fFilter) a to-square filter to be
applied in the GenLegalCallback before it tests the move for legality.
This patch is especially tricky for Crazyhouse, where the piece indicated
in the move might not be the piece actually on the board, because the latter
is a promoted Pawn, and has to be demoted toits base type before the
comparison.