Gravar-mail: Atomic structure and electronic properties of MgO grain boundaries in tunnelling magnetoresistive devices