Lattice Model of an Ionic Liquid at an Electrified Interface