First detection of gas-phase ammonia in a planet-forming disk. NH_3, N_2H^+, and H_2O in the disk around TW Hydrae