Dynamics in prestressed media with moving phase boundaries: a continuum theory of failure in solids