Refactoring lock-to-task state out of Task

- Moving the logic out of Task to the stack view which is more logical
  and easier to manage
- This also includes a fix for the issue of the screen pinning not 
  showing up immediately after toggling it in Settings

Change-Id: I0357d59fc30b0327bbe6eeca10b310911aba3cc4
9 files changed