doxygen: create indirect item references

This allows the items to be constructed as a derived class later
on (e.g. creating a Function class).
Rename scope to protection.
Define a create_item helper function.
generate_html: fix specifying the item
Fix default protection for e.g. namespace items.
Don't generate files for private/protected items.
Pretty print the items.
Cross-reference parent items in a scope chain.
Make each class responsible for its html formatting.