Fix LinkField circular import

get_all_field_names includes related fields, which means it populates
the appcache. We don't want to populate the appcache while loading
models, or we'll probably have a circular import.