Fix #471, add extra file type to allow upload for user import

Added text/plain and application/csv.ms-excel. It seems IE uses
different file type when upload.
Add application/octet-stream to upload allow type

Firefox sometimes generate application/octet-stream for the csv file.
Disable the type checking for upload csv file for now

It seems file type check is not very reliable as different browser and
different version will give different mime type.
Fix missing names in the email after creating user

Also fixed the wrong variables in addUser template
Fix incorrect logging when sending submission email failed.
Allow fall back to mail in template email

When stmp parameter is not set in system parameter, template email
component will fall back to use mail to send email.
Fix preview button on add event page in IE and FF
Unify the views in v1 controller

Removed the duplicated views for different actions and added logging to
the unified view json.ctp. Now we can see both request and response in
debug.log
Also added "oauth" parameter in url to bypass oauth when debug mode is on.
Fix user can't login with session transfer if there is an old session
Fix warnings caused by empty courseId in group controller
fixed some bugs for email templates

I have fixed adding merge fields in add and edit email templates.
I have also fixed the bug of invalid parameter when submitting the
edit form but making the parameter null if no parameter is given.
Lastly, I have fixed a css bug that seems to only appear on Safari
5.1.7 (Snow Leopard) by adding a width to the submit button.
Merge branch 'hotfix' into dev

Conflicts:
	app/controllers/evaluations_controller.php
	app/controllers/groups_controller.php