Refactor apps/files/ajax/newfile.php / Add StreamNotificationToEventSourceProxy class

Refactor apps/files/ajax/newfile.php
- Remove global variables
- Remove local untestable function definition
- Make notification code reusable

@DeepDiver1975 @PVince81