refactor common EARL reporter code into abstract parent class

The test manifest and test result reporters share some common code that
can be put in a parent class. For consistency, also generate JSON-LD
from the test manifest reporter and use the same namespace prefixes as
turtle.