Mechanism of interfacial polycondensation and the direct synthesis of stable polyamide membranes