MDL-46572 behat: extended table head look up to check if header is link

Header can be a link, this step will now look if
header has a text or header link has the text

Part of MDL-46191
MDL-46572 gradereport_history: added basic functionality behat test

Part of MDL-46191