Refeactor lastSelectedTreema methods.

This pull request is for keyboard navigation issues mentioned [here](https://github.com/codecombat/codecombat/pull/642).

Though I can fix it without change treema by calling toggleSelected() twice, there's a obvious latency on every clicks since the method walks through all nodes to see if they have last-selected class.

Here I add some functions for CodeCombat to directly manipulate the last selected node and avoid searching the whole treema on every clicks.