Fix for issue 1414 (Grade doesn't get updated when grading under TA)

Fixed by adding a check in _update_mark.rjs for the released checkbox, which would cause the methods to not run since it would fail for TAs, since there is no released checkbox.

Also did some code cleanup here and there. Opting for some pure JS instead of jQuery/Prototype since using those 2 together is a mess, and pure JS gives a tiny tiny tiny little performance boost over using libraries. Every bit counts!