Sema: Simplify checkAttributesAfterMerging

Use getDLLAttr to factor out some common dllimport/dllexport code.