Addresses issues described in #15019.
importwallet now throws an RPC error if input file is empty, or contains
no valid keys/scripts. Logs warnings if header/footer lines are missing
from wallet dump file.
This PR changes importwallet to log the number of keys and scripts imported, and logs a warning if the header (# Wallet dump file created by Bitcoin) or footer (# End of dump) of the wallet dump file is missing. A functional test was edited to check for the new RPC error. The RPC error is thrown only when no keys/scripts are imported or skipped. Importing files with only known keys/scripts will not throw an error.
All new error messages indicate to the user that files created by dumpwallet must be used instead.