PSOutputDev: Don't read outside of image buffer

Check whether input image is RGB or BGR to not treat
it as CMYK in those cases in PSOutputDev::checkPageSlice().

Fixes #751
6 jobs for PSOutputDev-Dont-read-outside-of-image-buffer in 3 minutes and 48 seconds (queued for 58 seconds)
Status Job ID Name Coverage
  Build
passed #271037
build

00:03:08

passed #271042
build_android

00:01:01

passed #271038
build_clang_libcpp

00:03:10

passed #271041
build_clazy

00:03:05

passed #271040
build_mingw64_fedora

00:02:47

passed #271039
build_ubuntu_16_04

00:01:47