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

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