ai: completed missionary problem and test

This patch completes the missionary problem but further
refactoring still needs to be done.
I should problably extract a common interface for solving
search problems (similar to the General Problem Solver)
from this missionary problem.
theory: add Node

This patch adds Node class to theory module.
Also, it completes the equality/non-equality/membership/hash
for Node and Edge.