json-ld expand/compact improvements

We have some code to handle the basics, but ideally we would use a library for compact/expand.

jsonld.js works, but is large and doesn't work that well with rollup:

Edited by Reiter, Christoph