Implement custom Configuration#to_javascript method.

The TinyMCE configuration is not valid JSON (since it includes
functions) so #to_json is not appropriate.