Currently, we load all template specialization if we have more than one module attached and we touch anything around the template definition.
This patch registers the template specializations as a lazily-loadable entities. This reduces the amount of deserializations by 1%.
I'm not sure we can safely use global state for this: loading update records can trigger the import of a declaration and *its* update records, which would mean we'd attach the pending lazy specializations to the wrong declaration. Can you keep this list locally in ASTReader::loadDeclUpdateRecords instead, and pass it into UpdateDecl?