Factor out enqueueOrDo in test_server.js #cosmetic

Principle: One-letter variables like `q` only allowed in very localized
scopes where a longer descriptive name would get in the way; variables
used in widely separated places must have long descriptive names
(especially and for example, function names)

Bonus: Reduce duplication of how to serve request
Rename callbacks in test_server.js #cosmetic

Rename callbacks to have imperative names instead of the redundant
"on$EventName" names
Reorganize code in test_server.js #cosmetic

Move immediately-executed code together into 'main' section; also,
sectionize the code.
Inline readFile in test_server.js #cosmetic

Only wanted it as a separate function because didn't have enqueueOrDo