Flow in a channel with accelerating or decelerating wall velocity: A comparison between self-similar solutions and Navier-Stokes computations in finite domains