Name js functions.

Give names to most manually assigned functions in the .js files, in form "x = function()" -> "x = function x()" so that error stack traces and profiling stack traces are more informative and do not contain anonymous functions.