Separation of ammonia-containing gas mixtures in a one-compressor multistage membrane apparatus