Fix _NEWP regression

- Fixed _NEWP regression that appeared in SMW 1.9
- Added extra tests to cover various decision paths
- Extend FileUpload to fetch $reupload from the hook in order to set _NEWP correctly
Add FileUploadTest
Merge pull request #170 from SemanticMediaWiki/newp-regression

Fix _NEWP regression