iwlwifi: move agn common code to iwlagn library file