The exported function instantiates a @tapjs/core!tap.TAP object if we don't already have one, or return the one that was previously instantiated.

Options may be provided, which will override the environment settings, but they are ignored if the instance was already created.