Fix various c++11 narrowing violations

Summary:
The best fix for these narrowing
violations is to use static casting

Test Plan: verified

Reviewers: randall.rushing, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D641
Hopefully fix media scanner issues

Please see http://forum.xda-developers.com/showpost.php?p=44370296&postcount=357
For inspiration

Change-Id: I71573992c565e9f32b2256f8ef017cc8ac49b285
Fix for the low processes kept bug

memoryInfo was not initialise properly

Change-Id: I3b1f1fac92a59a0a18b63625b66d33dc24b17086