core: Add IDs to ImageStatus

Added IDs to the ImageStauts enum, as per the FIXME comment at the
head of the class, in order to decouple the enum values from their
ordinals.

This is done in preparation to remove the unused INVALID status, so
that ILLEGAL will retain its value when INVALID is removed.

Change-Id: I364f95ea384e1742842066043780183e3d4244b6
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove ImageStatus.INVALID

The INVALID ImageStatus is not used anywhere in the codebase, and thus
can be removed.

Just to be on the safe side, this patch also includes an upgrade script
to convert any pre-existing INVALID images in the database to ILLEGAL
ones.

Change-Id: I256b289ab0afad1adb97d6518c6e764f76bac25b
Signed-off-by: Allon Mureinik <amureini@redhat.com>