Make revisionDate optional when revisionId is set
kfSanatizeJsCallback: Clean up regex
Make use of http_response_code unconditional

BaseTool now comes with a polyfill for that as of e810437.