Track separate save states for PDI format vs flat formats (JPEG, etc)

Workflow UI for layered images is tricky business.  (See GIMP's
disastrous efforts in this area, e.g. their much-hated "Export" vs
"Save" behavior in 2.8)

As usual, we're going to try to handle this more elegantly in PD.
Before tackling that, however, I needed to add support for separately
tracking save state for the internal PDI format vs flat formats like
JPEG, PNG, etc.  Why?

If a single-layer image has not been saved to PDI format, but it HAS
been saved to some flat format, great!  The user doesn't need to be
warned upon exiting the program or closing the image.

If, however, a multi-layered image has never been saved to PDI format,
regardless of whether it's been saved to flat formats, we should still
warn the user.  Implementing that UI will come later, but as of this
commit, PD can at least reliably track independent save states for PDI
vs flat formats.