Take Mats'es changes from bmove()->memcpy(), and fix all of them to be memmove() instead. I checked several of them, all of which were wrong (due to potentially overlapping source and destination), so most likely more of them are wrong. Painstakingly checking all of them for whether memcpy() could be used instead would be a very big and errorprone task, and really is not worth it.
Fixes a bunch of Valgrind errors in the test suite as well.