move allocateIds to request & generate docs.

Whenever a module requires a new link structure, we just link it with the matching version. These are later run against the lib/semver.js library to select the relevant links for the version the user is browsing the docs on.