Measurement of the charge asymmetry in B±→φK± and search for B±→φπ± decays