MDL-18229 gradebook: Linking activities and usernames correctly.

Activities to their course page and usernames to their
profile page as per standard.
MDL-18229 gradebook: Fix for loading activities.

Was using local variable iteminstance rather than cmid.
MDL-18229 gradebook: Renaming of Single_view to Single view
MDL-18229 gradebook: Links to Single view via icons on Grade Report.
MDL-18229 gradebook: Updating code to Moodle standard.