Layer-by-layer assembled stimuli-responsive nanoporous membranes