PDFBOX-1813: reverted most of the changes of revision 1557544 as it introduced several regressions (see PDFBOX-1865 and PDFBOX-1892)

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