Cppclean: remove unused function declarations.

Also moves some function declarations to the headers of where they
are defined, since Cppclean can't properly distinguish the problems.
Cppclean: remove an unused variable.
Cppclean: some misc. cleanup.

Death to recursive includes!