First-principles study of oxygen-vacancy pinning of domain walls in PbTiO 3