S-duality in AdS/CFT magnetohydrodynamics