add toplevel completion, resolve positions for position/usage completion (closes #327, closes #569)