This caches the result of Appearance.first in a similar fashion to how
ApplicationSetting instances are cached. We also add some NOT NULL
constraints to the table and correct the timestamp types.
Fixesgitlab-org/gitlab-ce#36066, fixesgitlab-org/gitlab-ce#31698