moved global  variable as static into purify() function.

for some reason the global variable wasn't always initialised correctly (error: purify() called on non-object), and also the static variable can't be accessed from outside the function.
CKEditor: avoid loading external configuration files
automatically resize ckeditor to fit content; fixes #45