PDFBOX-1990: added writing bitonal and grayscale images as single color samples and improved the unit test

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1579990 13f79535-47bb-0310-9956-ffa450edef68