Buckling beam micromechanical memory with on-chip readout