Refactoring of ProofAsst.importFromMemoryAndUnify()