nvi: use memmove to realign buffers
Replace a rather convoluted realignment algorithm with memmove(). In
addition to being hard to understand, the code would read beyond the end
of the input buffer in certain conditions (found on CheriBSD).
Sponsored by: DARPA
Pull Request: https://github.com/lichray/nvi2/pull/122
(cherry picked from commit 56ef9c872bc5b086d73fed6317159e40be32d40e)