Refactor LinksController::__scopeTreeToMenu() as Link::setTreeScope()

Continuation of #222 for 1.6