PRD-4713, PRD-4739 - manual merge of pull request 257, and minor fixes to pull-request

The code in PR-257 had problems handling some empty edits, and behaved flaky when updating formulas due to the way formulas were patched in the FormulaEditorPanel when an update-even was received.

I moved that edit-code out into a separate class and smothered it in unit-tests, so that this part shall no longer fail - ever!.