trim the ### .log prefixes and suffixes if they exist

This lets us consume raw test log output like the GELAM test-logs output
contains.  (Those markers are for ArbPL to find things it should chew, for
historical reasons relating to Mozilla's Tinderbox stuff where we had to
consume a single giant log file.)