Switch AssetFormat to fixed, loaded set; expose ids to api

Rather than caching, load all formats from the database at start time
and use this fixed list.  Add formats to /api/constants and switch asset
json format fields to ids.