Warnings cleanup.
No functional changes!
Fix jshint problems in ajax.js
Fix jshint problems in head.js
Fix jshint problems in dom.js
Fix jshint problems in event.js
Fix jshint problems in fonm.js
Fix jshint problems in channel.js

Use higher order functions to be able to properly count which callback is called and which not
Add the JS tests in Grunt lint checks
Improve the test for ChannelManager#drop(). It should work with higher order functions too.