Move navigation node CSS class generation to Node object

Signed-off-by: Michal Čihař <michal@cihar.com>
Factor out tree walking into separate method to share the code

Signed-off-by: Michal Čihař <michal@cihar.com>
Move code for geting navigation node icon into Node class

Signed-off-by: Michal Čihař <michal@cihar.com>