add topology support to ModelCreator, since Tortoise needs it

(cherry-picked from 74b5dc1e98caeb516abe4171878b4d603c2dfe6f
on tortoise branch)
minor changes to Link initialization, for Tortoise's benefit

cherry-picked from Frank's commit
d552c09988e1969c7be224c2970825278b045a21
on the tortoise branch
for Tortoise's benefit, add topology support to api.WorldDimensions

this is a partial cherry-pick of
Frank Duncan's commit
f80687658b7a35f28c94bbd6f83916cc8ce9c5e6
on the tortoise branch
keep reusable parts of headless.Shell in workspace.Shell

for Tortoise's benefit, so Tortoise can use workspace.Shell
as a basis for tortoise.Shell

this is a partial cherry-pick of my own commit
6ca964cb1b362a5b66208042fa8d703dfd701dcf
from the tortoise branch
make HeadlessWorkspace respect compilerFlags one more place

this was breaking the Tortoise docking tests because code inside
`declare` was getting compiled with optimization on

this is a partial cherry-pick of my own commit
c473e12a95ea3e21f552fdd4897f88dd56934d95
from the tortoise branch
add some accessors to breed prims, for Tortoise

this is a partial cherry-pick of Frank Duncan's commit
6ddfa23400d5c568409fd7997ae0527061d2b8ff
on the tortoise branch
mirroring/Tortoise: don't cache AgentKeys

this fixes NetLogo/Tortoise#1

note that this change will almost certainly increase memory usage for
recording model runs. after all, reducing memory usage is the reason
we added the caching in the first place.  so we may end up confronting
this again.

but on the headless branch, at least for now there *is* no recording
of model runs, so the mirroring code is only being used by Tortoise,
so the issue can be deferred for now

cherry picked from the tortoise branch

(cherry picked from commit 51e0562f1767f2195cd204153abd70d8350a2646)