A relativistic model for quasifree negative-pion photoproduction on nuclei