On Evaluating the Rate-Distortion Function of Sources with Feed-Forward and the Capacity of Channels with Feedback