Also use AVal origins when attaching origins to completions

Also return origins for type and definition queries