ActivityManager: memoize for performance

isHighEndGfx and isLargeRam are frequently called upon.. isLargeRam very
frequently within the ActivityStack. these aren't going to change after
they're calculated the first time so subject them to a basic memoization.
FTW.

Change-Id: I176089f99ac6c6e4074cb2fde502c729986ea701
Fix DataInputStream leaks

Fix fixes
-In viewstateserializer, try to close before throwing or returning, and throw early if inputstream is null
-other stuff

Change-Id: I7f3b16057582566b82a85841829ff6ed11cd570e
potential GraphRunner leak in camera effects

if the camera FCs while recording effects.. *poof* a tiny leak is born.
so.. we close mRunner onDestroy.

Change-Id: I6a7983f120a03137f545a3cd9bb07ff51a9cd2d7
The VM handles blocking SIGPIPE.

We don't need this any more.

Bug: 10211309
Change-Id: I8be0071d50296974e3861f8af9d2bae4f5678d5a
activity manager tweak-a-roonie

Change-Id: Ic511257e8154610288019c52fb41cc6bf551ebd3
fix cursor leaks in F_B

my previous commit was submitted before i was finished.  Here is an updated version.

PS2: missing bracket

Change-Id: I9d8048e49695cdac7ded086cd49ee6eb99e518cc