Melting of an Anchored Bilayer: Molecular Dynamics Simulations of the Structural Transition in (CnH2n+1NH3)2PbI4 (n = 12, 14, 16, 18)