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 4 minutes and 50 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #374980
build

00:04:50

passed #374985
build_android

00:01:01

passed #374981
build_clang_libcpp

00:02:54

passed #374984
build_clazy

00:03:01

passed #374983
build_mingw64_fedora

00:02:40

passed #374982
build_ubuntu_16_04

00:01:54