Allow defining functions in requirejs.yml

Some RequireJS config options such as init need a function, however
YAML and JSON can only store data - not JavaScript. As a workaround
this detects a function and unescapes it when the config is added
to the page in the helper.

Fixes #177