remove relink files for samsung encryption libraries.
Check to ensure that external is encrypted
Add flag for retaining layout version

Needed on Sony mint (Xperia T) as the /data/media folder is a
separate partition and normal data media wiping is not appropriate
for this device but the layout version file needs to be retained
for Android 4.2 multi-user.
Add build flag for custom graphics
Fix problems with thread creation on some devices

This fixes a problem with not reaching the backup completed page
after a backup is complete on certain devices (GNex, Note2).
Changing the stack size to 512KB seems to be the actual fix but
leaving the other changes in place as they may be helpful or are
better practices.
ORS engine fixes

Fix backup to not error when a non-existant partition is given.
Fix restore to run when no partition parameters are given.
Ensure that ORS runs after decryption and that zips install.
Fix a problem with the fake internal sdcard not mounting to
/sdcard on data media devices.
Fix problem with AOSP wipe_cache command
Add sideload command for ORS
Save version to cache
Merge remote-tracking branch 'upstream/twrp2.4' into jb-wip