Only set top.docRoot and top.iceRoot from index.php

Avoids having something output to the browser in places where we don't
want it, such as the new file-control-xhr.php file. Temporary
console.log for now as reminder to finish checking this out.
XHR and JSON now used when saving

First step towards replacing the old HTTP & form posting looparound
method, with a much more efficient XHR and JSON response system. For
now, only save uses this, load, delete, perms etc use old system until
save is stablised and fully tested.
Starts XHR call and when we have a response, if there's an error, show
that, otherwise, do the items listed in the doNext value.
New XHR file started for file-control

Will eventually replace file-control.php. Carries out same file checks
etc, plus defines error info, form looparound system gone in place of
2nd XHR call on save as/new file save. All JS moved into a doNext string
to be run on success (no errors).

The only output here is the JSON response once we have carried out our
processes.

Note: Diff loading/MDT mismatch system not done yet.