Add support for multiple hierarchical atomspaces

Should work, untested; there are some multithreading issues "which surely no one will hit (trademark)".