En federal domare i Washington DC ger nyhetsbyrån AP rätt mot Vita huset, som portat byrån från att bevaka president Donald Trump på nära håll.