Ritz-Volterra projections to finite-element spaces and applications to integrodifferential and related equations