Effects of temperature and solvent polarity on the interionic charge-transfer interactions in alkylpyridinium bromide