Avoid possible memory leaks by ensuring stream closures

Stream close() methods should always be called in finally block
to ensure we don't accidentally leak a stream.

Time to fix some old sloppy code.

Patch Set 2:
 + ensure closure of some other streams
Patch Set 3:
 + missing import java.io.IOException
Patch Set 4:
 + missing import
Patch Set 5:
 + missing ';'
 + whitespace cleanup
Patch Set 6:
 - Reverted changes to MemoryUsage (final requirement
     prevents my implentation)
 + fixed Object allocation in Root.java
Patch Set 7:
 + fixed curly bracket style violations
Patch Set 8:
 x fixed my own sloppy code :/

Change-Id: I3460b558ed5b4489296388c9a52fbb773cefd31f
REVISIT: remove some lag launching apps and improve scrolling

CHANGES:
    AbsListView:
        Clear cache when aborting previous fling
    Activity manager service:
        Reduce unnecessary locking in message handler
        Move a few locks relating to idle activities from inside
            a foor loop to outside. would rather hold until it's
            done than get stuck waiting for something else to release

Change-Id: Ie59615bfad90e3d7acd4f95367248868497e172d

Conflicts:

	core/java/android/widget/AbsListView.java
	services/java/com/android/server/am/ActivityStack.java