qdoc: Teach qdoc to use multiple trees

qdoc now builds a separate Node Tree for each index
file it parsed. The main Node Tree now contains only
the Nodes of things being documented in the current
module. This should make qdoc run a little faster.

qdoc now uses these separate trees to make intra-module
and inter-module linking more robust by searching the
trees in an order that depends on the type of link it
is searching for. The tree for the current module is
always searched first. Then qdoc searches the trees
for either the C++ modules or the QML modules, depending
on whether it is looking for a C++ link or a QML link.

In preparation for this update, qdoc was also simplified
a lot. Many functions became obsolete and were removed.
Others were combined.

Task-number: QTBUG-35377
Change-Id: Iea4e49869ff6a6ff0f4d53090728770d40d892f3
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
qdoc: Teach qdoc to use multiple trees (part 2)

qdoc now knows how to search the forrest of node
trees in an optimal order. But there remain some
problems with specific searches that cross module
boundaries. These include group membership and C++
and QML module membership, as well ass C++ base
class resolution. Part 3 will be concerned with
fixing these remaining bugs.

With this update, qdoc now takes less time to
generate the docs for Qt 5. Testing indicates
that qdoc run time has dropped from about 14
minutes to about 7.5 minutes on an iMac.

Task-number: QTBUG-35377
Change-Id: I6bded6ef54124b4f6e5914cad4548f0b600209b0
Reviewed-by: Martin Smith <martin.smith@digia.com>
qdoc: Teach qdoc to use multiple trees (part 3)

With this update, qdoc is now ready for testing
with multiple trees. In making this change to using
multiple trees, it has become clear that qdoc does
not really need trees the way it currently uses them.
Each C++ class or namespace, or QML type is naturally
a tree tree structure, but above that level, what we
currently call a tree in qdoc should really be called
a collection of maps. This change has moved qdoc in
that direction. It remains to replace the Tree class
with a class that encapsulates a set of maps, one for
each major node type. That can be implemented later.

Task-number: QTBUG-35377
Change-Id: I39068a0cb26c01f14ec0e4621742d727efb913bf
Reviewed-by: Martin Smith <martin.smith@digia.com>
doc: Remove "current child" code

The current child concept was added to the Name
Collision Node to heuristically provide better
linking when a link operation reached a collision
node. It is doubtful that this improved linking
much, but now that qdoc uses multiple trees, it
is much less likely that collision nodes will
occur. In fact, there are none in in the current
Qt5. Therefore, the current child code is hereby
removed from qdoc.

Task-number: QTBUG-37067
Change-Id: I33aea5d550afb7ceaf941d49112e02c21d44f6dc
Reviewed-by: Martin Smith <martin.smith@digia.com>
qdoc: fix inheritance information for some QML types

This update fixes a bug introduced by the extensive changes
for QTBUG-35377. For a QML base type loaded from an index file,
its QML base type was not being resolved. This resulted in the
"All members" page for some QML types to be incomplete because
the pointer to the base type was 0 when it should have been set.
This change also introduces the concept of "just in time"
resolution for base type pointers, which appears to speed up
qdoc a little.

Task-number: QTBUG-37326
Change-Id: I5f09336ec70ba84029b44b245c56f7f8fe349757
Reviewed-by: Martin Smith <martin.smith@digia.com>
qdoc: \l{Qt::Window} links to the wrong page

kThis update fixes a bug introduced by the extensive changes
for QTBUG-35377. The name Qt represents two namespaces, one
in C++ and one in QML. The name "Window" is used in both of
them, so the link \l{Qt::Window} would cause a collision in
the single tree qdoc. In the multiple tree qdoc, there is
no collision, but in this case the link should have gone to
the C++ page and it went to the QML page instead. The fix
involved correcting the way qdoc searches for link targets.

Task-number: QTBUG-37633
Change-Id: Ib9b209eced937a0be0d3299f300ebf22b2776012
Reviewed-by: Martin Smith <martin.smith@digia.com>
qdoc: Unexplained empty ref attributes in qhp files

This update fixes a bug introduced by the extensive changes
for QTBUG-35377. Three node subtypes - Group, Module, and
QML module, were promoted to be first line node types in the
update for QTBUG-35377. This broke the file name construction
routine for those node subtypes, which used to have the DocNode
node type. This caused empty ref attributes to appear for those
keyword elements in the qhp file. The file name construction
routine has now been corrected to account for this.

Task-number: QTBUG-37658
Change-Id: I307979255fdfd48493b3a4cebaf996b2130bc2c7
Reviewed-by: Martin Smith <martin.smith@digia.com>