Pull filetype validation into a stream process

This allows a source plugin to set the file type rather than the request being rejected the moment it is parsed, and also allows for custom filetype validators.