This is the unification algorithm from logic.py

I am in the process of figuring out this logic programming stuff.  That's
why this is here.  If anything comes of it I'll bring it back over to a
branch of my copy of the LogPy repo and send a pull request.

See https://github.com/logpy/logpy of Matthew Rocklin.