SIGN IN SIGN UP

(core) Make GRIST_SINGLE_PORT have a coherent meaning

Summary:
GRIST_SINGLE_PORT is now read only by the development server, where it still
chooses between one combined server and separate ones. For the standard server
it has no effect at all, where before it had a muddled one.

The flag had grown to be used essentially as a "single-server" flag. The
docker image set it, and the server set it by default unless DOC_WORKER_COUNT
was set (a development flag), so running more than one server meant knowing to
turn it off. Left on, a server answered for documents it did not have. Opening
one served a page from whichever server the browser reached, which during an
upgrade may be a different build of Grist. Copying one fetched it through the
home server rather than from the server holding it.

The flag is now disentangled from determining who holds a document. Redis
holds this information where there is more than one doc worker, and memory
holds it where there is only one. So there's no need for an extra flag, which
only allowed for confusing inconsistency.

For a single-server setup, document serving remains efficient, and the
browser keeps the address it already had. The uploads endpoint answers as it
did, and so does single user mode, which runs no doc worker. A server given a
public address, by APP_DOC_URL or a router, hands it out as before. On a single
server that setting used to be ignored and is not now, so a stale one will send
clients where it points.

Test Plan: added tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D5051
P
Paul Fitzpatrick committed
ce0df0916d295ff48399a70a9d05b2680bcde9e5
Parent: 09d0505