valgrind+afl: various problems

valgrind+afl: check p1 at start of loop
(cherry picked from commit e76098b22e5d3f5bb422dfcca34b4d61fe2bd593)
valgrind+afl: initialize cSize
(cherry picked from commit 9313095ea2d5f3dcc531d658e159e16ac2cb44fd)
valgrind+afl: short read
(cherry picked from commit 9d7979b1319ed7360cec8765a1b387dc1e086148)
valgrind+afl: initialize nFlags
(cherry picked from commit f23a51c9f978a3a8796a63ebcc03f7fcad52c6dc)
valgrind+afl: short read
(cherry picked from commit a967c85b13819e2c81082edec0f217259dca7ca8)
valgrind+afl: short read
(cherry picked from commit 1e9a50075bd39e1387f43605eeaa0132af1bd2c0)
valgrind+afl: bad rle
(cherry picked from commit a9aee04ecfbc4494b752b10e2a2348a0ccb991f1)

Change-Id: I0a9e5fc88ed1fcc7f1bd21218cabeb0adf65c9f4
Reviewed-on: https://gerrit.libreoffice.org/12383
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>