Changes to complete the build
Better composition type detection
Modernize libgralloc

based on a tripple way diff with a modern 4.1 and 4.2 repo