Add support for grouping protocol functions

Protocol functions are grouped under their respective protocol, and are displayed indented.

My css foo is limited, so the output can be made prettier...