Fixes #210

Completely changed the way entity spans are created/tracked.
Added error messages for document loading
Added Orlando and CWRC Entry mappings
Related to #210
Fixed entity/struct priorities

Prioritizes entity when tag has struct and entity entries.
Empty entityHighlight is removed correctly
Certainty buttons populate markup options

Also fixed duplicate attributes in exported XML
Updated CWRC-Dialogs, added cookie login
Merge pull request #228 from nigelgbanks/issue-228

CSS default styles strange behavior when editor is smaller than 768px wide.
Merge pull request #229 from nigelgbanks/issue-229

Can't configure baseUrl for require.js
Merge pull request #230 from nigelgbanks/issue-230

CWRC-Writer makes RDF xml invalid upon saving
Fixes #227
Dialogs initialization change
Fixes #231
To support a non global jQuery many scripts had to be wrapped in module
definitions. On the same vain the cD object had to be changed from being global
to being AMD compliant.

Also during this process I found that jQuery Snipper requires
jquery-migrate-1.2.1 to function as it uses the old $.browser function which
was deprecated and removed in jQuery 1.9.