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)
10 jobs for 258-address-ubsan-warnings-v9_11 in 14 minutes and 38 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Precheck
passed #12059
linux docker amd64
precheck:debian:sid:amd64

00:00:11

failed #12052
amd64 docker linux
precheck:debian:sid:amd64

00:01:10

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

00:01:54

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

00:04:52

canceled #12065
linux docker amd64
build:debian:sid:amd64

00:00:00

failed #12053
amd64 docker linux
build:debian:sid:amd64

00:02:32

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

00:07:27

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

00:07:38

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

00:04:04

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

00:03:16