Method of extracting ammonia from gas flow in synthesis of urea