Hybrid ferromagnet-semiconductor nonvolatile gate