ActivityStack cleanup

- Moved some methods that mostly operate with internals of
  ActivityRecord and/or logically should belong their to
  ActivityRecord class.
- Reduced visibility of some methods and fields.
- Other minor cleanups.

Test: Manual and existing tests still pass.
Change-Id: I87ed6987c88512dda3cd69fa43a1f093d47d0bff
6 files changed