Ticket #508 - General: Functions clean-up

- Moved a number of functions from page templates to the functions library,
also added a couple of new library files to keep functions library
organized
- Also did some additional clean-up, such as configuring the
  sidebar-group-archive.php to work with the People archive