PDFBOX-2550: allow indirect object and avoid ClassCastException in getColour()

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