Retire generate_king_moves()

We have only one call place so inline its content.
BTW, function is already declared as FORCE_INLINE.

Also some small refactoring while there.

No functional change.
Don't prefetch if not needed

Prefetch access to hash tables only in case we
have changed pawn or material hash keys.

No functional change.
Get rid of some locals in do_castle_move()

Rewrite the logic to get rid of kBefore and rBefore.

No functional change.
Rewrite do_null_move()

Use a more traditional approach, along the same lines
of do_move().

It is true that we copy more in do_null_move(), but we
save the work in undo_null_move(). Speed test shows the
new code to be even a bit faster.

No functional change.
Revert "Remove Threat Extension"

This reverts commit 8737b26a23afb36d70cb32e3d53eeac7239685bf.
Rewrite do_castle_move()

And handle the castle directly in do/undo_move().
This allow to greatly simplify the code.

Here the beast is the nasty Chess960 that is
really tricky to get it right because could be
that 'from' and 'to' squares are the same or
that king's 'to' square is rook's 'from' square.

Anyhow should work: verified on all Chess960
starting positions.

No functional and no speed change also in Chess960.
Revert null threat changes
Switch to logging structs
Add beginning of python analysis
List movecounts by depth
Print exit types
Cleaner exit types prining
Merge remote branch 'upstream/master'
Merge branch 'master' into stats