Fix tracing of <object-reference>

The trace protocol contains mainly of a form (the top-level-definition),
and nodeids. The <object-reference> instances are not in an environment,
thus do not have a form, but should appear there once another control or
data flow node references it. To achieve that, the #"new-object-reference"
is only sent when the first user is registered.

Furthermore, rename #"add-temporary" to #"new-temporary" to unify message types
Fixes for the tracing protocol:
* #"optimizing" has a single node id
* #"add-temporary" was renamed to #"new-temporary"
* #"new-object-reference" was just introduced
Cleanup imports
Code cleanups
Merge pull request #668 from hannesm/fixes

Fixes