[Android NTP] Move suggestions in SuggestionSection into a separate TreeNode.

This makes SnippetArticle a pure model class that doesn't know about the adapter.

Goals of the overall refactoring:
1) Decoupling the various pieces of logic, by moving them from the adapter into
the tree structure. For example, dismissal is something that could be handled by
a TreeNode instead of doing the big switch statement we have right now in the
Adapter.
2) Stabilizing the structure of the tree. Right now we tend to throw away
everything and rebuild, which means we have to manually figure out what changes
exactly to notify about (cf. removeSuggestion). If we keep the tree structure
stable and just adjust the number of children below each node as necessary (like
SigninPromo already does), we get correct notifications for free, and it will
allow for some optimizations as well (we could cache the number of children for
each node and update it incrementally when a subtree changes. Right now we'd
have to contort ourselves a bit to make that work with things like
resetChildren()).

BUG=616090

Review-Url: https://codereview.chromium.org/2439683003
Cr-Commit-Position: refs/heads/master@{#427060}
2 files changed