The `nsIAsync{Input,Output}Stream` base classes' Close() methods are
already documented to be idempotent. Do the same for their synchronous
counterparts, and make the necessary changes to ensure this.
The only known functional change here (modulo the removal of some
uninteresting logging) is to `nsFileInputStream`, which now avoids
calling `Tell()` if the stream is already closed. (The other early-exits
added here are formally redundant, but neither obviously nor robustly
so.)
This silences some console warning spam when running a debug build from
the command line.
Differential Revision: https://phabricator.services.mozilla.com/D171615