Add typing to Solver interface.

This change allows solver implementations to have requirements on the type of SearchNode or environment they are working with. Currently none of the solvers have this requirement, but it does have some valid use cases, specifically for the selection criteria in BeamSearchSolver.