Implement DocumentsProvider.createDocument and deleteDocument

Fixes AOSPA-431
This is needed to delete and create files/folders in DocumentsUI.
Some open questions are:
1. Are the methods implementented according to their description?
E.g I'm not sure whether deleteDocument should be able to delete folders, too.
2. I first didn't want to modify public API, but deleting files from within DocumentsUI somehow doesn't work - file.canWrite() always returns false
3. So is modfying the API this way OK?

Change-Id: Ie3a9d1888decaa0f08de1a5183ffd23760be15b9
Revert "Themes: Fix wallpaper chooser crash"

This reverts commit 7cca08daf6eb4f362a7b43763bc4675bf44a9874.

Reverted commit removed Theme Engine's dependencies. The NPE isn't reproducible for me (N4),
also i added back the missing permission that here was restored:

https://gerrit.paranoidandroid.co/#/c/4472/

Change-Id: Ie061ad72350dc10d3302791d2b7e037fa048d3c9
WallpaperCropper: Add missing Theme Engine permission

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Pie: Fix Pie positioning when PIE_ALWAYS_AT_RIGHT

Locking Pie to a single physical side of the screen makes perfect
sense when it's done on the short side of the screen (bottom in
portrait) as then Pie is more easily swipeable in at all times, but
a user might instead prefer being able to quickly swipe in from the
right or left hand side in portrait which becomes cumbersome when the
device is turned to landscape as the user is then forced to reach to
the middle of the long side of the screen which becomes located at
the bottom making it harder to access Pie.

The PIE_ALWAYS_AT_RIGHT value should be used to solve this issue
by forcing Pie to relocate itself to the right hand side just
like with the stock navigation bar.

Change-Id: I9b4dd3cee3fa7d85194389640dcedc02fa522530