Add a base Solver class.

When we start to implement a new algorithm, we can implement a
derived class and implement all the virtual functions. ArapSolver
is a good example to start.