added commands to refresh the cache directory into the upgrade script

- in the production mode, cakephp doesn't refresh the cache directory,
so we'll need to do it manually whenever we upgrade the database.
- I've created a function in the upgrade_base for this purpose, which is called
every time an upgrade script is run.
fixed releasing comments for student view of evaluation results

- after the feature to un/release individual comments have been
implemented the release mechanism for comments became broken.
- now the grade/comment release status are default to be set to
released if the auto-release option is turned on. If the option is
kept off, the release status is unreleased.
- so if users want to remove specific comments from the results,
they can do so and the change will be reflected on the student
evaluation results view.
- when the release status is saved on the events add/edit form,
the group events' grade and comment release status is:
        - set to None if auto-release is off
        - set to Auto if auto-release is on
- if the auto-release option is changed through the edit form,
all the submitted evaluations' comment and grade release status would
be changed appropriately.
- some duplicate functions have been removed (also removed their
backend tests)