Theory of switching in p-n-insulator (tunnel)-metal devices: Part I: Punchthrough mode