added logging of refreshes

- when student refreshes exam, it is logged (at the point where he
reloads the exam), in order to help determine cheating
- added logging function with possibilities for more types of logging