Passing a Go string to the JS world is expensive. This change reduces this cost by preparing function objects by bind. Closes #1438