Improve code style in the Scaladoc implementation.

It fixes the following inefficiences or code style violations:

	- Explicit asInstanceOf calls.
	- Boxing symbols instead of using plain NoSymbol.
	- Matching `this` instead of late-binding.
No longer suppress self types check.
No longer cache all subclass templates.

Instead only cache direct subclasses and compute all known subclasses
as a transitive closure.