Mathematical model of charge and density distributions in interfacial polymerization of thin films