Refactoring report.php to make use of user settings

We had a requirement to add user id number (personal identifier) to the UI for certificate report as well as considering some user settings in /admin/settings.php?section=userpolicies under 'Show user identity' to be displayed.

mod/certificate/report.php in particular have been refactored to incorporate the new changes, use of flexible table, generalising functions  for making spreadsheet and getting user data.