Explaining $h \to \mu \tau$, $B \to K^* \mu \mu$ and $B \to K \mu \mu / B \to K e^+e^-$ in a two-Higgs-doublet model with gauged $L_\mu - L_\tau$