Minor improvements to fabrikeditor

1. Console message if debug
2. Edit point to start of data (rather than everything selected).
Further improvements to fabrikeditor

This additional commit provides the following further improvements which
are designed to avoid bugs in pluginmanager:

1. If you delete a preceding plugin, then the textarea id changes and
ace stops working properly. To fix this we store the dom object in a
local variable so changes to id do not impact.

2. If you have e.g. 2 plugins and you delete the first and create a
second with the same plugin as remaining, then ace creates divs with
same ids. This commit adds a random 6-digit hex number to ace div ids
(and styles) so that you won't get clashes (ok - there is a small
probability 1 in 2^48 of getting the same random number).
Merge pull request #1057 from Sophist-UK/improve_fabrikeditor

Minor improvements and fixes to fabrikeditor