Oxygen vacancy formation and electronic reconstruction in strained LaNiO3 and LaNiO