isc_buffer_*(): if source can be NULL, only call memmove() when length is non-zero

Certain isc_buffer_*() functions might call memmove() with the second
argument (source) set to NULL and the third argument (length) set to 0.
While harmless, it triggers an ubsan warning:

    runtime error: null pointer passed as argument 2, which is declared to never be null

Modify all memmove() call sites in lib/isc/include/isc/buffer.h and
lib/isc/buffer.c which may potentially use NULL as the second argument
(source) so that memmove() is only called if the third argument (length)
is non-zero.

(cherry picked from commit 6ddbca6f)
9 jobs for 258-address-ubsan-warnings-v9_12 in 18 minutes and 39 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Precheck
passed #12045
amd64 docker linux
precheck:debian:sid:amd64

00:00:10

 
  Build
passed #12046
amd64 docker linux
build:debian:sid:amd64

00:03:22

passed #12061
i386 docker linux
build:debian:sid:i386

00:01:57

canceled #12060
linux docker i386
build:debian:sid:i386

00:00:00

failed #12047
i386 docker linux
build:debian:sid:i386

00:04:48

 
  Test
passed #12050
amd64 docker linux
systemtest:debian:sid:amd64

00:04:38

passed #12051
i386 docker linux
systemtest:debian:sid:i386

00:13:07

passed #12048
amd64 docker linux
unittest:debian:sid:amd64

00:00:43

passed #12049
i386 docker linux
unittest:debian:sid:i386

00:00:46