[TS] Moved auth state checking to util.h.
[Util] Removed TreeItem from models.

ModelItem{,Base} should be used instead, being way more stronlgy-typed.
[TS] Store whole user2info map for friends requests
[TS] Use Util::Map().
[TS] Refactored friends tracks getter into func.