PDFBOX-2503: don't ignore all trailing space alike characters, but NUL; added some test cases for metadata validation based on Maruans testfiles

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