Refactor to soyjs.Func and a DefaultFuncs map.  Supports user-supplied functions for soyjs.
More convenient js writer helper