Fix sluggish to launch an app

The new trace feature/code in 4.0.4, which will dump the app stack
trace every 500ms if an app can't be launched within 500ms, is
holding the global ActivityManagerService lock unnecessarily. It
slows down the app's startup.

Change-Id: I91fbb043912b4d1fcf3e80d8ac4e61cd20ad89d1
Solution: move the trace file write operations out of sync block.

Conflicts:
	services/java/com/android/server/am/ActivityManagerService.java