Avoid adding non-existent elements

php code was doing addElements on elements which were not in the HTML
due to Access constraints, leading to JS errors, stuck spinners and an
infinite loop of errors in textarea.js.

php needs to be fixed to prevent this, but if it does happen, this fix
will give graceful error handling.

Also added similar checks to addElementFX and dispatchEvent.
Make watchValidation error message consistent.
Minor tweaks to:

1. Indent addElementFx and dispatchEvent calls
2. Use Fabrik.blocks on watchValidation calls
Merge pull request #1143 from Sophist-UK/fix_elements_in_code_block_when_no_access

Elements are added to code block when access is disallowed.