Use canonical 'base' instead of 'BASE'

BASE was only a stopgap until we had the real name, and the definitions
all call it lowercase so lowercase it is.

Also remove the no-longer-used make stream id to name map function.
Add prep work and notes for building structures

No functional differences here, just a few comments on what we'll have
to do. The outcome is, on registration of a new item in the library,
record against the item whether it iis a name, definition or relation.

When we build structures we should build them in name > defintion >
relation order.