re #466: Rebuilt ckeditor_wiris plugin using widget

CKEditor has built-in functionality for building "widgets" that wrap
up advanced editing behaviour.

Rebuilt ckeditor_wiris to use this instead of the giant pile of hacks
that was there previously.

Also minimising that amount of crufty core.js JavaScript called by
doing everything directly where possible.