Migrate form \OCA\AppFramework to \OCP\...

FYI @butonic @DeepDiver1975 @karlitschek @wakeup @LukasReschke 

WIP - FileSystem problems


 I inject $container->getServer()->getUserFolder() [(see here)](https://github.com/owncloud/core/blob/master/lib/public/iservercontainer.php#L86 ) and it creates a new storage where nothing is inside (except the 'files/') and therefore it can't find anything.

```
MariaDB [oc]> select * from oc_storages;
+------------+------------+
| id         | numeric_id |
+------------+------------+
| home::mjob |          1 |
+------------+------------+
1 row in set (0.00 sec)

MariaDB [oc]> select * from oc_storages;
+-----------------------------+------------+
| id                          | numeric_id |
+-----------------------------+------------+
| home::mjob                  |          1 |
| local::/srv/http/core/data/ |          2 |
+-----------------------------+------------+
2 rows in set (0.00 sec)
MariaDB [oc]> select fileid, storage, path, parent, name from oc_filecache;
+--------+---------+-----------------------------------------------------+--------+-----------------------------------------------+
| fileid | storage | path                                                | parent | name                                          |
+--------+---------+-----------------------------------------------------+--------+-----------------------------------------------+
|      1 |       1 |                                                     |     -1 |                                               |
|      2 |       1 | files                                               |      1 | files                                         |
|      3 |       1 | files/welcome.txt                                   |      2 | welcome.txt                                   |
|      4 |       1 | cache                                               |      1 | cache                                         |
|      5 |       1 | files/01 - The Quest.mp3                            |      2 | 01 - The Quest.mp3                            |
|      6 |       1 | files/02 - Leviathan.mp3                            |      2 | 02 - Leviathan.mp3                            |
|      7 |       1 | files/03 - That Famous Ol' Spiced.mp3               |      2 | 03 - That Famous Ol' Spiced.mp3               |
|      8 |       1 | files/04 - Keelhauled (voice-over).mp3              |      2 | 04 - Keelhauled (voice-over).mp3              |
|      9 |       1 | files/05 - To the End of Our Days (voice-over).mp3  |      2 | 05 - To the End of Our Days (voice-over).mp3  |
|     10 |       1 | files/06 - Black Sails at Midnight (voice-over).mp3 |      2 | 06 - Black Sails at Midnight (voice-over).mp3 |
|     11 |       1 | files/07 - No Quarter (voice-over).mp3              |      2 | 07 - No Quarter (voice-over).mp3              |
|     12 |       1 | files/08 - Pirate Song.mp3                          |      2 | 08 - Pirate Song.mp3                          |
|     13 |       1 | files/09 - Chronicles of Vengeance.mp3              |      2 | 09 - Chronicles of Vengeance.mp3              |
|     14 |       1 | files/10 - Wolves of the Sea.mp3                    |      2 | 10 - Wolves of the Sea.mp3                    |
|     15 |       1 | files/folder.jpg                                    |      2 | folder.jpg                                    |
|     16 |       2 |                                                     |     -1 |                                               |
|     17 |       2 | files                                               |     16 | files                                         |
+--------+---------+-----------------------------------------------------+--------+-----------------------------------------------+
17 rows in set (0.00 sec)

MariaDB [oc]>
```
The above was before the music app was opened (which triggers the scanner) and the below was after. The ownCloud base dir is `/srv/http/core`.

If I replace the `getUserFolder` with `getRootFolder` it finds files - and gets the correct storage) But this should be the same except the change dir here: https://github.com/owncloud/core/blob/master/lib/private/server.php#L242:L253 Or did I miss something?

@icewind1991 Do you know why?

BTW: @icewind1991 Congrats! The Node/Files/Folder object oriented way to traverse the filesystem is easier to handle than the Views/Storage/Mounts/Filesystem/Files stuff ... is it planned to be replaced or hidden in private namespace in core? How should it be used?