Inline createRoot() into publicapi.js

R.I.P. createRoot().
We'll miss you. Fond memories. Please don't come back.
Move `contents` closer to its only use

...which is to be closed over in .revert()

Note have to detach container's contents *before* appending root.jQ.
Fix setting LaTeX detaches cursor but stays focused

...resulting in subsequent typed math or math written with
.mathquill('write', ...) to insert nodes into the edit tree, but insert
DOM nodes before the detached cursor DOM node and hence remain detached,
ultimately resulting in "ghost math" that is editable and visible to the
API but whose HTML elements aren't in the page.
Rm unused `cursor` variable from publicapi.js

Should've been removed with its only use in
782d88ef921931aa7195bd172835f0c2d644ad3c
Remove commented out code #cosmetic

That line is unnecessary, as described in the commit message for
c2176280cab5501ececcdf914c60cdc62d9a6433, probably a typo that it was
left in as a commented out line.
Add Controller, which owns the cursor

To allow for this refactor to be done piecemeal, continue to make the
cursor accessible as `root.cursor`.
Move general latex im/export {rootelements => latex}.js

(By "general" I mean not specific to particular commands.)

I left the code that, on a 'copy' event, gets the selection LaTeX, in
rootelements.js for now just try to strip down Root{Math,Text}Block.

I know it looks like I just took some code that branched with
polymorphism and turned it into code that branches on a flag, but that's
only because...that's exactly what I did. But the point is to centralize
the branching in publicapi.js, so there's eventually one place to split
up into a class hierarchy that branches on polymorphism.

Also had to change the up/down unit test, which kinda reaches in and
helps itself to the root block methods, but hey, there's one less place
that relies root.cursor!