fix: manage.py init creates initial database

migrations.AddField fails to add the "chapters" many-to-many field when
called with default=None.

The field is created without the default=None kwarg, and is altered
right after creation to match the model.
Merge pull request #109 from maciej-filip-sz/fix-init

fix: manage.py init creates initial database
refactor(management): move handlers and server to separate files

Handlers and server-starting code will be shared by the runserver
command and the customized LiveServerTestCase.
feat(document): allow Firefox to open editor

Add Firefox to allowed browser in the editor browser-check script.
test(document): create working Selenium tests

Selenium tests will be needed for thorough testing of editor behavior in
Firefox. Two simplest-possible caret tests are added in document.tests.

The tests use LiveTornadoTestCase, which is Django's LiveServerTestCase
customized to run a Tornado server, using the code earlier refactored
from base.management.commands.runserver.

Additionally, javascript helper functions are added in the newly created
test folder. They are passed as a python string to Selenium to execute
inside the browser.
fix(test): add the required license text to Django code

test.testcases.LiveTornadoTestCase and LiveTornadoThread are almost
entirely code from the original Django LiveServerTestCase. Using that
code requires presence of the Django license.
Thanks @maciej-filip-sz ! This switches to your selenium testing setup, also for Chrome testing.
jsbeautify editor-setup
divide paste and cut js
remove old paste methods, switched to object constructor for cleanHTML
beautified paste.js
fixed link button and split link creation up into button, mthod and dialog template
betetr node cleaning
better node cleaning, part 2
better node cleaning, part 3
better node cleaning, part 4
better node cleaning, part 5
no error when scrollIntoView isn't present
final touches for pasting from Libreoffice
reenable footnote import through paste