Store the actual depth in the t-table.

Fix storing the depth search instead of the actual move number in each
transposition table. This results in fewer successful lookups, so the
search depth has been decreased.
Store console output in log files.
Improve the t-table replacement algorithm.

Check up to 3 entries when inserting to find an empty entry or the entry
with the least depth.
Fix compile errors in grid unit test.

Update the grid unit test to reflect changed function signatures. Does
not add any new tests.