remove the last use of GAP pexpect in that file;
remove no longer needed #optional tags in some tests
CC: @fchapoton @dcoudert
Component: graph theory
Author: Dima Pasechnik
Branch/Commit: 6489a18
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/28818