Cleanup code of files_sharing/ajax/ a little bit

- Use OCP\Response constants instead of the HTTP error code
- Use checkAppEnabled() instead of OC_App::isEnabled with an if statement
- Remove uneeded variable $baseURL
- Rename $isvalid to $isValid

@PVince81 @georgehrke