Currently, the client with provided -rpcauth option still creates the .cookie file.
However, if -rpcuser and -rpcpassword are provided the .cookie file is not generated.
This PR makes client behavior consistent.
Refs:
- #7044
- #7044 (comment) by gmaxwell
- #13118
Also this PR ensures that the auth cookie is still generated in regtest mode on test purposes.