PDFBOX-1496: don't clear the dictionary when clearing PDResources, correct handling null values when calling a setter of a cached value

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