Performance: Use entrance config to get static ids

We can sometimes avoid a roundtrip to the database at
/profile/:username/static-base-url by looking for
static ids in the entrance config before looking
in the database.