Update WordSearchSolver.java

Fixed concurrency issues.