Modular $A_4$ symmetry and light dark matter with gauged $U(1)_{B-L}$