process: cleanup after method use

There's no need to run process._setupDomainUse twice. Remove it after
it's done running.
test: add API examples as tests

These show a good amount of supported functionality in the form of unit
tests, and should all pass once the API has been properly supported.