Quasistatic evolution of perfectly plastic shallow shells: a rigorous variational derivation