capsule: Find paths to all Views.

This cl builds the infrastructure to return to Views that aren't
completely explored. For each view, it finds a path from the root to
that view by stepping backwards and finding which UI element in the
preceding view leads to that view.

This will allow us to return to a view by restarting an app and clicking
on the appropriate elements from the list.

Also, change the view_array to a map.

Change-Id: Iea8e9bca7588b692e187241bc0a741bc6e7851d5
3 files changed