fix several template issues for modules (#522, #672)

- Show type info for modules that export something other than a class or a function. (#672)
- Do not duplicate the module description at the start of each page.
- Display the module description before the class description. (#522)