Deposition Mechanisms in Layer-by-Layer or Step-by-Step Deposition Methods: From Elastic and Impermeable Films to Soft Membranes with Ion Exchange Properties