[WifiInstaller] Delete files only if parsed successfully

Added input checks and delete the configuration file (passed as
a URI) only if it contains a valid Passpoint configuration.

Bug: 176756691
Test: Download a real configuration file, verify correct
installation and file deleted.
Test: Download a garbage file with the correct mime type, verify
that installation fails and the file is nore deleted.

Change-Id: Ic9106d46abd9bed642465b8d023bac6dfc5a0f3b
1 file changed