gui: database: Don't write file on error

* Cancel the write of the temporary file when an error has been detected

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
format: writer: Propagte failure to caller

* Return a boolean to the caller on a failure instead of just returning.
  This allows the caller to cancel the write to the file so that it
  isn't corrupted.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
gui: Display database write error to user

* Present the user with more information about the error.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>
Merge branch 'error_handling' into yubikey
challenge: Propagate failed challenge to caller

* If a removed Yubikey is to blame, re-inserting the Yubikey won't
  resolve the issue.  Hot plug isn't supported at this point.
* The caller should detect the error and cancel the database write.

Signed-off-by: Kyle Manna <kyle@kylemanna.com>