Measurements of electroweak W j j production and constraints on anomalous gauge couplings with the ATLAS detector