toolbox: Add levelFromUid categorization support to restorecon

This is necessary for the app data relabeling on migrated devices
to include the proper app context. Freshly installed apps get this
done automagically, as do newly created files.

Change-Id: If7421dac01c6ae8bd78e66f71e69298ed850a7ab
Merge remote-tracking branch 'CyanogenMod/cm-10.1' into cm-10.1
fs_mgr: Drop the context mount option from non-selinux builds

This will require that transitioning devices have context as the
last mount option, since everything after it will be ignored

Change-Id: Ic5cc7f5632cc3d62459dfaaf7719d662737e1641
fs_mgr: Don't assume all fstab entries have options

Change-Id: I5f537b09d96efa2758372f9da6d66996c2164ee8
Revert "fs_mgr: Drop the context mount option from non-selinux builds"

This reverts commit 806fc566fd4544cfcd3334aa1a992bab0f6d277c.

Revert "fs_mgr: Don't assume all fstab entries have options"

This reverts commit a73b2264dfd89d526054e4be9926be9f50cca791.
fs_mgr: Drop the context mount option from non-selinux builds

Transitioning devices may have the context option present in the
fstab, even if we're not doing selinux builds.
Since we don't set or even create the contexts on those builds,
this will make mount fail, and either the mountpoint ends up absent,
or boot fails entirely

Change-Id: Ic5cc7f5632cc3d62459dfaaf7719d662737e1641
Merge remote-tracking branch 'CyanogenMod/cm-10.1' into cm-10.1
Fix failure to build from source with modern _host_ glibc/gcc.

One should not define __USE_GNU directly, and instead _GNU_SOURCE
should be defined as early as possible, before first (indirect)
inclusion of features.h

Change-Id: I4d109d4fa0c3d266b873d2a0a66a52e1a4faa234
Signed-off-by: Dmitrijs Ledkovs <dmitrijs.ledkovs@canonical.com>
Merge remote-tracking branch 'CyanogenMod/cm-10.1' into cm-10.1
Merge https://github.com/legaCyMod/android_system_core into pa-cm-10.1