Scatter a max_nodes limit throughout the minimax code to limit time spent
Compile with profiling by default and fix a bug with max_nodes not being decremented