The top quark legacy of the LHC Run II for PDF and SMEFT analyses